- Home /
Question by
user-3012 (google) · Jun 12, 2010 at 11:52 PM ·
rotationlock
How do I keep the angle of a box?
I have a cube I want to use as my 2d character in a platform game.
I want to make it so that the rotation of the cube NEVER changes so that when a slope comes along he will fall down without falling to the left or right.
Comment
Answer by fherbst · Jun 13, 2010 at 12:34 AM
I assume your cube has a rigidbody assigned? Rigidbodies have a property "freezeRotation" that prevents them from being rotated by the physics engine.
http://unity3d.com/support/documentation/ScriptReference/Rigidbody-freezeRotation.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613062005im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Forcing a rotation point 2 Answers
Locking Rotation object on Z axis 1 Answer
Lock Z rotation to 0 2 Answers
Object Rotating On Z Axis No Matter What 0 Answers
How do I lock the Y rotation on a first person character controller 1 Answer