D3DXIntersect problem

Started by
0 comments, last by dave 18 years ago
I am trying to use D3DXIntersect to do collision detection between two meshes. The problem i am having is with the first parameter LPD3DXBASEMESH pMesh, the meshes that are in LPD3DXMESH format is there a way to convert the mesh type. Also does it only return the closest triangle to intersect the ray? I am producing the a ray from each vertex of the first object for the position? For the rays direction vector i am using the velocity vector normalized. I am not sure if this is correct as i have not been able to find much online about it.
Advertisement
The function will accept a mesh of type LPD3DXMESH because the LPD3DXBASEMESH is the base type and it can be back casted automatically.

Dave

This topic is closed to new replies.

Advertisement