   Rotating a mesh around the local coordinates
  I''ve searched the forum, but none of the suggestions worked for us.  We''re trying to make it so that a mesh will rotate on its own local coordiantes, not based on world coordiantes.  If I rotate it halfway around, then halfway up, it won''t be the same as if I would rotate it on its local.  Here''s the drawing function and SetTransforms:SetTransforms code: void TOutpost_Graphic::SetTransforms(){D3DXMATRIX World, View, Projection;D3DXMatrixIdentity(&World);m_d3dDevice->SetTransform(D3DTS_WORLD, &World);D3DXMatrixLookAtLH(&View, &m_Camera, &m_CameraFocus, &D3DXVECTOR3(0.0f, -1.0f, 0.0f));m_d3dDevice->SetTransform(D3DTS_VIEW, &View);D3DXMatrixPerspectiveFovLH(&Projection, D3DX_PI / 4.0f, 1.33f, 1.0f, 1000.0f);m_d3dDevice->SetTransform(D3DTS_PROJECTION, &Projection);}  Rotate code: void TObject::Rotate(float pitch, float yaw, float roll){m_Pitch += pitch;m_Yaw += yaw;m_Roll += roll;}void TObject::SetRotate(float pitch, float yaw, float roll){m_Pitch = pitch;m_Yaw = yaw;m_Roll = roll;}  The Draw function that rotates the mesh and then draws it void TObject::Draw(bool zBuffer){D3DXMATRIX World;D3DXMATRIX RotX, RotY, RotZ;D3DXMATRIX Translation;D3DXMATRIX Scaling;D3DXMatrixTranslation(&Translation, m_X, m_Y, m_Z);D3DXMatrixRotationX(&RotX, m_Pitch);D3DXMatrixRotationY(&RotY, m_Yaw);D3DXMatrixRotationZ(&RotZ, m_Roll);D3DXMatrixScaling(&Scaling, m_Scale, m_Scale, m_Scale);D3DXMatrixIdentity(&World);D3DXMatrixMultiply(&World, &World, &Scaling);D3DXMatrixMultiply(&World, &World, &RotX);D3DXMatrixMultiply(&World, &World, &RotY);D3DXMatrixMultiply(&World, &World, &RotZ);D3DXMatrixMultiply(&World, &World, &Translation);m_d3dDevice->SetRenderState(D3DRS_NORMALIZENORMALS, true);m_d3dDevice->SetRenderState(D3DRS_ZENABLE, zBuffer);m_d3dDevice->SetTransform(D3DTS_WORLD, &World);if (m_CustomColor){D3DMATERIAL8 material;ZeroMemory(&material, sizeof(D3DMATERIAL8));material.Diffuse.r = material.Ambient.r = (float)m_Red/255;material.Diffuse.g = material.Ambient.g = (float)m_Green/255;material.Diffuse.b = material.Ambient.b = (float)m_Blue/255;material.Diffuse.a = material.Ambient.a = 1;m_d3dDevice->SetMaterial(&material);}for (DWORD i = 0; i < m_MaterialCount; i++){// set the material and textureif (!m_CustomColor) m_d3dDevice->SetMaterial(&m_MaterialList[i]);m_d3dDevice->SetTexture(0, m_TextureList[i]);m_Mesh->DrawSubset(i);}m_d3dDevice->SetRenderState(D3DRS_ZENABLE, true);}  Any suggestions?  
  try this - helped me tonswww.sgi.com/software/performer/brew/aqua.html  ;  Thanks, that link have a lot of info!  I''ll also study the other stuff in there ;  I have very similar code for rendering each of my models and it works fine for positioning and rotating arounf their local coordinates. Can''t really see anything wrong with your code though, unless matrices are getting multiplied out of order (didn''t look like it though).   void SetScalingFactor(float sx, float sy, float sz) { D3DXMatrixScaling(&m_matScale,sx,sy,sz);}void SetRotationYPR(float y, float p, float r) { D3DXMatrixRotationYawPitchRoll(&m_matRot,y,p,r);}void SetPosition(float x, float y, float z){D3DXMatrixTranslation(&m_matTrans,x,y,z);}// code inside the render function for the model:// set the world transformations for renderingD3DXMatrixMultiply(&m_matTemp,&m_matRot,&m_matTrans);D3DXMatrixMultiply(&m_matWorld,&m_matScale,&m_matTemp);m_pd3dDevice->SetTransform(D3DTS_WORLD,&m_matWorld);for (int i=0; i<m_nNumMaterials; i++) {m_pd3dDevice->SetMaterial (&m_pMaterials[i]);if(m_pTextures[i] && m_bUseTexture)m_pd3dDevice->SetTexture(0, m_pTextures[i]);ret = m_pLocalMesh->DrawSubset(i);}  ;  The code looks ok to me. You are using Euler angles -- maybe the problem is gimbal lock.  