Archived

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

Psybr

gimbal lock

Recommended Posts

I won''t bother explaining gimbal lock in detail here (mainly because that would require some thought on my part to make it understandable), but I suggest you look at this article here on GameDev. It discusses Quaternions really, but there''s some stuff about gimbal lock in there (because one thing that quaternions can solve is gimbal lock).

As for matrices solving gimbal lock - they don''t.

John B

Share this post


Link to post
Share on other sites
Just a clarification... gimbal lock is only a problem if you''re using Euler angles (roll, pitch, yaw). If you''re determining rotation matrices through other methods, gimbal lock won''t be a problem for you.

Share this post


Link to post
Share on other sites
From the Game Dictionary "A problem encountered when one tries to rotate using the 3 axises where one ends up rotating in the wrong direction after several rotations." So basically picture being upside down but your controls are not reversed. So now your controls work the opposite of what you would intuitively expect.

Share this post


Link to post
Share on other sites
From a player perspective, an example of gimbal lock might be when your game character tries to look straight down while spinning in a circle. As you get closer to looking straight down, oddities start to occur, like it might become really hard to control your rate of spin, and you may find yourself spinning wildly with small mouse inputs. That would be a result of your physics model being succeptable to gimbal lock.

I think you avoid gimbal lock by using quaternion math to represent an object's rotational behhavior, and then convert the quaternion to a matrix for rendering purposes. That's one way I think, but there is likely other ways.

Value of good ideas: 10 cents per dozen.
Implementation of the good ideas: Priceless.

The Battlezone Launch Pad

[edited by - BS-er on May 5, 2002 6:34:06 PM]

Share this post


Link to post
Share on other sites