- Home /
How to rotate on slopes with rigidbody ?
hello everyone i would like to know how to rotate my player on slopes. i'm testing the movement on a cube and when i go up a slope it doesn't rotate well so i checked the rotation on the rigidbody. but i want the player to rotate on slopes so i would like to know how to do it manually.
i'm using transform.translate to move.
thanks for any help.
Comment
Don't use Translate to move a rigidbody. The collision detection will be buggy to non-existent.
Handle rigidbodies in FixedUpdate and either AddForce to move or use $$anonymous$$ovePosition, which is similar to Translate but will detect collisions.
To rotate a rigidbody you can AddTorque.
meat5000, this is a good answer. Why did you post it as a comment ?
Your answer