- Home /
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?
Answer by dogzerx2 · Aug 09, 2012 at 04:14 PM
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!
Your answer
Follow this Question
Related Questions
Torque forces or Quaternion transforms for hovercraft rotations? 2 Answers
Orbit Camera Around Player And Add Force 3 Answers
Best way to approach flight? 0 Answers
Accelerate a rigidbody towards max speed 2 Answers
Make the player rotate with the ship 2 Answers