How to take only one key input at a time?
Hello I am making a 2.5D Mario type game. Above pic is a part of my player script. In that script when my player is moving in the right direction, if I press a 'left arrow' key or 'a' key my player rotates in that direction and moves. The issue is while my player is moving in the right direction and if I press left arrow key my player rotates in the left direction but moves in right direction. The same happens when my player is going in the left direction. How do I make sure that it takes only one key input. Can you please help me.
Your answer
Follow this Question
Related Questions
How to make a pseudo 3d object change sprites (animations) based on where the player is facing it 0 Answers
Rotating a 3D object with movement along a 2D background at an angle 1 Answer
Rotate Flashlight X Axis in Direction facing based on Mouse Input 0 Answers
Orbiting Crosshair issue when trying to stop at a specific angle 0 Answers