Need Some Freelook Help w/ Quaternions Plz Help

Started by
19 comments, last by 31337 20 years, 11 months ago
I read the gamsutra article, but alas I still don''t understand why my camera controls are so wierd. Perhaps this will give someone some insight into my endless woe''s of 3d rotations:

When I do just straight matrix multiplication with no quaternions, I run into a problem:

When my camera''s yaw is < 180 (or > 180, not quite sure), the viewing vector translation works fine by multiplying it by the product of my yaw rotation matrix and my pitch rotation matrix.

HOWEVER, once my yaw angle flips to being not less than 180 (or to being 180, just the opposite of before), my viewing vector pitch calculations are inverted.

WHY ON EARTH would this happen? Is this supposed to happen? Man this is confusing...
OpenGL Revolutions http://students.hightechhigh.org/~jjensen/

This topic is closed to new replies.

Advertisement