How to make the character move only left and right when it enters trigger box

you would put the limited input either into the same place the normal movement would be done for a bool type implementation:

or if you are using the Enhanced Input Subsystem then you can also create a separate Input Action that is assigned to a different Input Mapping Context

You can look here How can I disable InputAction except some Input Action In Enhanced Input? for more details on the differences between the 2 implementations.

1 Like