D3DXMatrixRotationY( &matTrans2, rotX );
D3DXMatrixMultiply(&matWorld2,&matWorld2,&matTrans2 );
D3DXMatrixTranslation(&matTrans2,transX,transY,transZ );
D3DXMatrixMultiply(&matWorld2,&matWorld2,&matTrans2 );
pd3dDevice->SetTransform(D3DTS_WORLD, &matWorld2);
//player x file
Before rotation:
After Rotation:
just as the above picture show...i wan to keep direction Z is same as the direction my character facing to...
but using the code above i only can rotate my character,cannot rotate the world coordinate...so i wan to ask is there anyone can help me to solve this question?