Yet More Quaternion Problems
Hi,
I think I''m nearly on the brink of getting some of my very eclectic mix of other people''s quaternion code to actually work, but have come up against yet another problem. To test it, I''m using a skybox, and am moving the camera using the mouse and SDL. to get my rotation angles I subtract the current mouse x from half the width of the screen, and multiply it by a constant, and do the same for my y values. I then create a quaternion from these Euler angles and a zero Z rotation, and slerp it with the current rotation quaternion of the skybox, before applying the resulting quaternion to the modelview matrix. (i''m not attempting any translation at this stage. When the program starts up this is fine, but by the time I rotate my view 180 degrees round the y(ish)-axis the control system has inverted itself. Where moving the mouse up meant up, it now means down, although left and right still seem ok. I''d be very grateful if anyone can suggest a way to resolve this. Thanks in advance for any help given.
John
"In the beginning, there was nothing... which exploded." - Terry Pratchett
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement