AddForce to transform.up locks ship at 90/270 degrees (gimbal lock?)...

Hello, I am pretty sure I’m experiencing gimbal lock when applying rigidbody.AddForce(transform.up * nose_thrust);

The current result is the space ship locks at 90 or 270 degrees and spins on it’s x axis. Does anybody know how I could achieve endless rotation on the “up” axis using a rigidbody? I do not think it will work with Quaternions so I’m not sure what to do.

Thanks in advanced!

Nothing at all :( Is there a problem with my question, or is this just too obvious?

1 Answer

1

For rigidbody rotation use AddTorque instead of AddForce!
You could rotate by adding a force at a position using AddForceAtPosition, but you should also apply an opposite force at the opposite position from the center of mass!

I never got gimbal lock with rigidbody’s rotation, but I do get a lot of that headache when dealing with angles directly.
I’ve learned not to increment the angles directly, but to use the Rotate function. But this is only when dealing the transform.

Hope this helped!