But I was wrong somewhere, but I don't know where.
Here is the wrong code:
void _camera::rotateX(float angle){ thirdA.w = angle; D3DXQuaternionNormalize(&thirdA, &thirdA); D3DXQUATERNION tmp; D3DXQUATERNION tmp2; D3DXQuaternionInverse(&tmp, &thirdA); up.w = 0; D3DXQuaternionMultiply(&tmp2, &thirdA, &up); D3DXQuaternionMultiply(&up, &tmp2, &tmp); look.w = 0; D3DXQuaternionMultiply(&tmp2, &thirdA, &look); D3DXQuaternionMultiply(&look, &tmp2, &tmp);}
I have 3 quaternions I use to represent the directions of side-to-side and forward movement, or the axis of the rotation. There are look, up and thirdA.
But the code doesn't want to run as way as I want :S
Where was I wrong?
[Edited by - AmidaBucu on August 29, 2010 3:54:33 PM]