3D angle Problem

Started by
0 comments, last by Evil Steve 14 years ago
Problem is when AI change direction, the face of AI won't face to the proper direction. I use this function to move model's face.

D3DXMatrixRotationY(&matrix,angle);

this function for movement.

g_Mesh.vPos.x += sin(angleX)*speed;
g_Mesh.vPos.z += cos(angleZ)*speed;

How can I apply angleX and angleY to be one single value for AI to rotate its face to the way where it gonna go? In directX has some function can help?? thanks
Advertisement
You could just build the matrix manually from the sin and cos rotation values, you don't need to use D3DXMatrixRotationY().

This topic is closed to new replies.

Advertisement