Rotation Constraint problem

Hi all!

I’m trying to set up springs of a car for my game.
I use Realitic Car Controller for the controls but I want to make model springs and drive system to follow
the car script. So I’m trying to use constraints.
Problem is when I make a rotation constraint to the object to follow the wheel rotation in Y axes
when I move forward the model flips front and back.
See this youtube link to have a better idea what I mean:

1 Like

If you are reading from or writing to .eulerAngles this will cause problems due to gimbal lock, which will cause flipping over like you report.

Never read/write from .eulerAngles unless you understand their limitations.

Thanks for the reply! I actually use Unity’s build in rotation constraints, so maybe I should write my own code to unlock gimbal locks? Sorry if this sound stupid but I am Unity noob.

1 Like