Hi guys, I''ve got a rotation problem I''ve can''t seem to get right... Basically I have a planet, I''m controlling what portion you look at with the number pad.
8 up around X axis;
2 down around X axis;
4 left around Y axis;
6 right around Y axis;
7 rotates around Z axis;
9 rotates around Z axis;
I need left to ALWAYS move left ect... at any orientation.
The problem is, it only rotates in the correct directions all the time for the first matrix I multiply by. In this case, around the X axis:
D3DXMatrixRotationX (&matViewTemp, angYZ);
D3DXMatrixMultiply (&matView,&matViewTemp,&matView);
D3DXMatrixRotationY (&matViewTemp, angXZ);
D3DXMatrixMultiply (&matView,&matViewTemp,&matView);
D3DXMatrixRotationZ (&matViewTemp, angXY);
D3DXMatrixMultiply (&matView,&matViewTemp,&matView);
Is there any way to make this work with out manually checking each angle for each axis? So far I''ve come up with alot of funny paths, but no correct ones. Any help would be really great!
Thanks
BTW: im aware that being above 90 degrees in the Y direction flips the directions of the x keys... that''s not the problem. later!