   Mouse Clicks Vs Meshes (Help me!)
  I have a mesh and I''d like to know where the mouse clicked on it. I have tried D3DXIntersect but I cannot make it work.Check it:BOOL cApp::CheckMouseClick(){D3DXVECTOR3 vecRay, vecDir;D3DXVECTOR3 v;D3DXMATRIX matProj, matView;D3DXMATRIX m;m_Graphics.GetDeviceCOM()->GetTransfor (D3DTS_PROJECTION, &matProj);m_Graphics.GetDeviceCOM()->GetTransform(D3DTS_VIEW, &matView);D3DXMatrixInverse(&m, NULL, &matView);v.x = (((2.0f * m_Mouse.GetXPos()) / m_Graphics.GetWidth())  - 1) / matProj._11;v.y =-(((2.0f * m_Mouse.GetYPos()) / m_Graphics.GetHeight()) - 1) / matProj._22;v.z = 1.0f;vecRay.x = m._41;vecRay.y = m._42;vecRay.z = m._43;vecDir.x = v.x*m._11 + v.y*m._21 + v.z*m._31;vecDir.y = v.x*m._12 + v.y*m._22 + v.z*m._32;vecDir.z = v.x*m._13 + v.y*m._23 + v.z*m._33;BOOL Hit;DWORD Face;float u, v, Dist;D3DXIntersect(m_SceneMesh.GetParentMesh()->m_Mesh, &vecRay, &vecDir, &Hit, &Face, &u, &v, &Dist, NULL, NULL); return TRUE;}If you can send me a real working example, that would be the best!I want to use it in this way:http://web.axelero.hu/yinyang/dracoon.jpgThank you,Drakondracoon@freemail.hu  
  are you transforming your mesh before rendering? in other words, are you moving/rotating/scaling the mesh? if so, you also need to apply the inverse of that matrix to your ray point and normal so that the ray is transformed into the mesh''s local coordinate system.  