Skip to main content
GameDev.net gamedev.net
🔒 Locked

Transformations in outer space...

Started by Jeffno10 Oct 9, 2002 at 3:10 PM 0 replies 800+ views
Original Post
Jeffno10
Jeffno10
I have a ''star field'' made up of random points in a spherical formation around the origin, but when I try to add yaw, pitch and roll (using glRotatef) the results are distorted... each works fine on its own, but when combined can yield wrong results, for example: if yaw is 90, then pitch is partly right, and partly ROLLING... if yaw is 180, then pitch is totally rolling if yaw is +180, then pitch is reverse... operates in the wrong direction!!! (if I try to turn left, it turns right) I''m sure this is something to do with combining the matrices, and i''ve tried using the relevant trignometry with gluLookAt and I get the same results... please help ! << Vous ne m''aurez pas cru, mais vous m''avez cuit >> Jeanne d''Arc
Sander
Sander
This is a very common problem that is called "gimble lock". Yuo should use quaternations (sp?) to overcome it. Go to NeHe''s and go to game tutorial #8. It''s all about space transformation and rotations and it will teach you all about quaternations.

Sander Maréchal
[Lone Wolves Production][Articles][GD Emporium][E-mail]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.