D3DXMATRIX matXRotation, matYRotation, matZRotation, matCoordinate, matWorld;
D3DXMatrixTranslation( &matCoordinate, -400, 1, 200 );
D3DXMatrixRotationX( &matXRotation, m_XRotation);
D3DXMatrixRotationY( &matYRotation, m_YRotation);
D3DXMatrixRotationZ( &matZRotation, m_ZRotation);
D3DXMatrixMultiply(&matWorld, &matXRotation, &matYRotation);
D3DXMatrixMultiply(&matWorld, &matZRotation, &matWorld);
D3DXMatrixMultiply(&g_mCenterWorld[nObjectnum], &matCoordinate, &matWorld);
Mesh Coordinates
Hi,
I have some problems about mesh coordinates and rotating it.
First i set the coordinates(D3DXMatrixTranslation -400, 1, 200) after that i try to rotate the mesh with(D3DXMatrixRotationX).It's ok until now but mesh rotates around the origin(0, 0, 0).I want the rotation around mesh's origin (-400, 1, 200).
What am i going to do for fixing the problem?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement