Archived

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

Marty666

Lots of (at least my) quaternions are fake...

Recommended Posts

Hi all, I guess my quaternions are fake... * convert euler to quaternion * convert quaternion to matrix * glmultmatrix i still have gimball lock. Logical. This is how i interpreted the tutorial, it''s not right though. That''s what i''ll try to explain. The way to solve this is to postmultiply. What u do is store the camera quaternion and multiply by a quaternion that represents the change from the last orientation to the next. Normally gimball lock will only be noticable at large rotations (if you rotate one axis on top of another rotations of the other will be overruled, because the other axis wil stay in the same place). You will need to understand gimball lock before you read the next part. Because the postmultiplication of the quaternions usually involves very small angles (from the last orientation to the next, with a smooth camera movement it''s a small angle). Gimball lock seems not to occur, because the rotation around one axe is so small that the other axes remain allmost perpendicular to the rotated axe. The next time you change orientation you will restart the whole proces. This is why sometimes you get strange effects (look up forums on ''quaternions''). You''re not using quaternions correctly and the effects grow as you make larger camera changes per camera update (more sensitivity). How should i use quaternions correctly? Thanx, Marty

Share this post


Link to post
Share on other sites