I had a problem playing with the Input Manager, where for example:
When Horizontal (+) is pressed, it increase its value but, when Horizontal (-) is pressed, the horizontal value stays positive for a little, but keeps decreasing. This causes the character to continue playing "right" animations and still moving to right for a few seconds, instead of instantly playing 'left" animations and moving to left. The problem also makes the character movie a little after the player releases the key.
I have also used Input.GetKey()
, but that means the player cannot change the setting from the game launcher, and I don't want to create player setting in-game, for now.
What I am trying to achieve is when Horizontal (+) is pressed, then the player presses Horizontal (-), it should instantly turn left without delay. When the player is not pressing any Horizontal key, it should stop moving horizontally, instantly. This problem also appears along the Vertical axis.
How do I make it so input snaps to -1 or 1, with out slowly moving back and forth?