Direct3D Rotation |
Wierdo
(2/18/00 4:58:01 am) Hi, I'm new at Direct3d and I
got a problem with rotating polygons. I can rotate it in one axis but not
two or three at the same time.
Can someone set up some code or just explain what I'm doing wrong. thanks,
Daniel Netz (2/18/00 8:02:43 am) I dunno since I haven't had
time to get into transformations yet, but you should check the D3DIM samples
out from the DX7 SDK, I'm sure you can find rotation codes there.
Corre (2/18/00 3:20:54 pm) Here is what I do, and this works for me: Dim WorldMatrix as D3DMATRIX
'Modify WorldMatrix to create
a translation matrix
DirectX.IdentityMatrix Rot 'Sets up the rotation matrix 'Using the left-to right
order of matrix concatenation,
'First, pitch
'Then, yaw
'Finally, roll
'Apply the rotation matrices
to the translation already in
In this example X, Y and Z holds the position of the object, and Roll, Picth and Yaw holds the orientation hope this helps /Corre, MiCo Games
|