2d character controller tutorial stuck while walking
So, tried to find another thread like this but couldn't find one.. sorry if there's one already.
Back to the topic, my problem is that following the 2d character controller tutorial, the character can walk and jump without problems, but sometimes when pressing A or D (the horizontal axis) , is just dont let me walk the direction I'm pressing unless I walk the opposite direction first..
Example : Im walking left pressing A , and then pum! character stuck from nowhere, can't walk on that direction no matter how many times I press A again, I need to press D first, and then I can walk A again, and that happens a lot... why is happening ? Here's the code :
void FixedUpdate ()
{
float move = Input.GetAxis ("Horizontal"); //Use the horizontal axis to move our character , A & D and arrow directions
body.velocity = new Vector2 (move * speed, body.velocity.y);
}
Your answer
Follow this Question
Related Questions
Character hits invisible ghost collision when jumping against objects while pushing against them 0 Answers
Space between sprites 1 Answer
How to make a system in unity 0 Answers
Detect the objects staying on top of the Particles 0 Answers
Adding Coyote Time and Jumpbuffer gave player infinite jumps. 1 Answer