Jump to content
  • Advertisement
Sign in to follow this  
Dean1988

Collision Detection with a ID3DXMesh?

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I know this is probably a stupid question, but i can't seem to find a simple answer to my question, probably because there isnt a simple answer!! hehe... Basically, i want Collision Detection in my Dx9 app, as everyone would do. I've read a few docs, but something just isn't clicking in my head. I've looked into ColDet which seems quite good, but i'm not sure how i can get the Polygon's X/Y/Z Coords from inside a ID3DXMesh, i'm guessing via a VertexBuffer, but i've not been able to find much info on them either. So as you can probably tell, i'm a little confused! I've done 2D Collision Detection in the past, but that's nowhere near as complex as this, so that doesn't really help me much. Anyone have an Ideas? Sorry to be a n00b! Cheers, Dean

Share this post


Link to post
Share on other sites
Advertisement
Quote:
i'm not sure how i can get the Polygon's X/Y/Z Coords from inside a ID3DXMesh, i'm guessing via a VertexBuffer, but i've not been able to find much info on them either.


Use ID3DXMesh::GetDeclaration to get format of the VB.
Use ID3DXMesh::LockVertexBuffer, ID3DXMesh::LockIndexBuffer to read from VB and IB.
The IB contains indices of triangle list.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!