Sign in to follow this  
jammy5202

D3DXIntersect problem

Recommended Posts

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.

Share this post


Link to post
Share on other sites
The function will accept a mesh of type LPD3DXMESH because the LPD3DXBASEMESH is the base type and it can be back casted automatically.

Dave

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this