#### Archived

This topic is now archived and is closed to further replies.

# Gimbal Lock

This topic is 5946 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

what is Gimbal lock? How do I avoid it with Euler angles. BTW, what are Euler angles, exactly?

##### Share on other sites
Use quaternions insted, the ginbal lock happens when you use 90 degree of rotation , this problem is solved using the complex method as in quaternions, if you look around there is a plenty of examples in the net

##### Share on other sites
The gimbal lock occurs only when you rotate around all three axes and when you reach a 90 degrees and, only when you use Euler rotations.... So you could take the long hard workaround by using quaternions. Or you create your own rotation matrix out of three vertices, which represent your three axes. One of the NeHe tutorials, handles this topic. Or drop me a mail and I will send you the relly easys maths...

##### Share on other sites
I believe gimbal lock occurs when there is an ambigious orientation. I think this is what quaternions try to solve. My favorite representation is the orthogonal basis vector matrix, which is just the "right", "up", and "direction" vectors in the first three rows of the matrix, and finally the "position" vector is the forth row of the matrix. This representation can also fail if you try to compose the "up" vector from the "direction". This is a common mistake when using this representation. The solution is to never compose the "up" vector, but start with an initial direction and up that''s orthogonal, and always rotate _both_ vectors by the same rotation matrix, this insures the objects orientation is preseved.

##### Share on other sites
Thanks everybody. I thought gimbal lock would crash my comp or something