When I rotate the tank and change the Z axis to move it forward, it doesn't move FORWARD, it move in another position.
The code is similar to the following:
D3DXMATRIX matRot;
D3DXMATRIX matCenter;
D3DXMATRIX matScale;
D3DXMatrixTranslation(&matCenter, 0.0f, 0.0f, 0.0f); // *** Rotation point ***
D3DXMatrixTranslation(&matPos, tankPosX, -240.0f, tankPosZ);
D3DXMatrixRotationYawPitchRoll(&matRot, D3DXToRadian(tankRotX), D3DXToRadian(0.0f), D3DXToRadian(0.0f));
D3DXMatrixScaling(&matScale, 1.0f, 1.0f, 1.0f);
d3ddev->SetTransform(D3DTS_WORLD, &(matScale * matCenter * matRot * matPos));