Hi, i’m a newbie, i have a problem, i can move my character normal but when i jump over an obstacle my character just lie down like this, i think it’s because of gravity so i don’t know how to fix this, please help me, thanks for reading and sorry for my bad English
Does your character have a rigidbody2D component attached to it? If so, then make sure to freeze rotations. It’s under “Constraints” in the inspector.
5 Likes
thank you, i freeze my Z axis and all work well, but i don’t understand why, because it’s 2D enviroment there are Y axis and X axis, why is there Z axis ?
2D motion has three degrees of freedom:
- Translation along the X-Axis
- Translation along the Y-Axis
- Rotation around the Z-Axis
In short, in 2D you cannot move along the Z-Axis but you can rotate around the Z-Axis.
4 Likes
thank you for you explanation