well i finally did it -- i learned how to do D3D
i feel good :D
now i'm having a bit of a problem.
here's the rotation code for my game:
D3DXMatrixMultiply(&matLocal, &matRotateX, &matRotateY);
D3DXMatrixMultiply(&matLocal, &matLocal, &matRotateZ);
BTW, matLocal is the matrix of the object, and matRotateX/Y/Z are rotation matrices built from the object's angles.
looks like normal code, right? well the problem is that the object rotates on its local X and Y axes, but on the world Z axis.
and if i change it like this:
D3DXMatrixMultiply(&matLocal, &matRotateZ, &matRotateY);
D3DXMatrixMultiply(&matLocal, &matLocal, &matRotateX);
notice the X and Z are switched. now it rotates on its local Y and Z axes, and on the world X axis! it seems whichever matrix is multiplied in last is based upon the world axis.
anyone have a solution for this? i'm sure there is.
[edited by - Drakex on December 1, 2002 6:18:55 PM]
_______________________________________________________________________Hoo-rah.