Quote:Original post by AmidaBucuJust recently had pretty much this same discussion in another thread, which you can find here.
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.)
Quaternion camera with directx [SOLVED]
Oh :(
Sorry then, my fault.
Btw. now the code is:
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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement