Original Post
Ok so I finally get a model animated in my program so what is the next step? Get him to move while he runs instead of just running in place because running in place is boring.... I have been trying to get things to work but I cannot figure out how to make it work.... Here is the scenario... it is not a high class set up I have just been trying to get it to work any way I could think of: I have 3 static variables that increase or decrease when a given key is pressed/held... I use one variable to keep track of how much the camera has rotated one to keep track of how much the character has rotated and one to keep track of how far the character has moved. When the program loads the character is rendered at the origin looking down the +Z axis. I had it set up so when W/S were pressed the static variable for movement went up/down and then I did a D3DXMatrixTranslation with the variable as the Z value and 0 for x and y. Then I do D3DXMatrixRotationY twice once for Characters rotation and once for cameras rotation.... but now is where the problem lies. Say the reslt of the D3DXMatrixTranslation was Move and the result of the D3DXRotations were CamRotate and CharRotate At first I had the World matrix = Move * CamRotate * CharRotate.... and the character would successfully move in the direction he was facing but when you try to turn him he would just rotate around the origin so as you got further from the origin the worse things got. Then I realized that I should have the characters rotation transformation go first so he will turn and then I can move him then rotate the camera so WorldMatrix = CharRotate * Move * CamRotate and this resulted in the exact opposite problem he would rotate around his own Y-axis but he now only moved back and forth along the Z-axis no matter what direction he was facing.... I have been trying all sorts of crazy things and none of them have worked.... so can anyone explain to me how you go about positioning a character so he will spin around his own Y-axis and also move the direction he is facing... I am really out of ideas.... it is times like this I wish I had learned more geometry in high school : / Thanks in advance.