Quaternion camera with directx [SOLVED]

Started by
11 comments, last by AmidaBucu 13 years, 8 months ago
Quote:Original post by AmidaBucu
If there are advantages of using quaternions, then could You give me a link for an explanation abut quaternions? (the math, how is it works, etc.)
Just recently had pretty much this same discussion in another thread, which you can find here.
Advertisement
Oh :(
Sorry then, my fault.
Btw. now the code is:
void _camera::rotateX(float angle){	D3DXVECTOR3 tmpv(thirdA.x,thirdA.y,thirdA.z);		D3DXQuaternionRotationAxis(&thirdA, &tmpv, angle);		D3DXQUATERNION conjugate;	D3DXQuaternionConjugate(&conjugate, &thirdA);	look.w = 0;	look = (thirdA*look)*conjugate;		up.w = 0;	up = (thirdA*up)*conjugate;}


The rotation is working great now, but due to some reasons with negative mouse movement
after the rotation done, the camera rotates back.
(The quaternions (as vectors) have the right value after rotation)

I really would like to know why I can not to rotate the camera around the side-to-side axis with negative angle.

[Edited by - AmidaBucu on August 29, 2010 7:53:53 AM]
Solved by LancerSolurus !
BIG THX :D

This topic is closed to new replies.

Advertisement