Collision Detection with a ID3DXMesh?

Started by
0 comments, last by gamelife 18 years, 8 months ago
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
I''m new,so take it easy.
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.

This topic is closed to new replies.

Advertisement