- Home /
keep rigidbody z rotation zero
Hi all, Im working on a snowboard game and I want to keep my board horizontal around its Z axis. Actually what does exactly what I need is this:
rigidbody.rotation = Quaternion.Euler(rigidbody.rotation.eulerAngles.x, rigidbody.rotation.eulerAngles.y, 0);
the problem is that this solution at some point ruins the physical simulation especially at higher speeds ( weird bumps and rotations). I tried freezerotation, but it only lead to obscure rotations of my rigidbody. I also tried to use configurale joint but I was not sucessfull, maybe because the settings of it are quite confusing, often not acting as I would expect from what I set up. Also there is not much info about it around.
Can anyone provide some good idea on solving this problem? Or how would you set up the configurable joint for this?
Thanks in advance
Your answer
Follow this Question
Related Questions
How to limit the motion direction of a GameObject? 1 Answer
How to make a dynamic bow shot and the arrow to curve and turn correctly when shot? 0 Answers
How to set a limit for my player rotation ? 0 Answers
transform.Rotate and Rigidbody.MovePosition 1 Answer
Gravity on a rotating platform 1 Answer