5 replies to this topic
Members - Reputation: 122
Posted 06 October 2001 - 01:18 AM
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...
Members - Reputation: 113
Posted 06 October 2001 - 11:30 AM
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.