- Home /
Player is falling to the sides
Hey all, I am very new to unity and right now I am working on a simple endless runner in 3d. I am using a simple capsule as player. Right now I have a moving charakter, I have endless platforms coming in front and being deleted in the back of the level, I have random obstacles spawning and I have a death/restart system if the player falls down or hits an obstacle.
BUT:
As soon as I hit play and the player moved a bit it always falls to the side and rools off the map.
I don´t know why?
Can you help me with that?
Answer by Llama_w_2Ls · Feb 16, 2021 at 09:33 PM
Is the player using a rigidbody controller? If so, there's most likely physics being applied to the object, causing it to topple over, when colliding with something. There's a simple way around this, and that is to lock the x, y, and z rotation of the rigidbody, so that it can't topple over.
You can do this by going into the contstraints dropdown in the rigidbody component in the inspector, and ticking lock x, y, and z rotation.
Answer by unity_2SESLRPAe2WjaQ · Feb 16, 2021 at 09:46 PM
Awesome :) it helped. Thank you so much :)
Your answer
Follow this Question
Related Questions
wanna know what make my char stop 0 Answers
Character Controller problem 0 Answers
Character motor movement and jump 1 Answer
Character movement with rotation 1 Answer
When walking, my character will not change sprites. 0 Answers