Hi, I'm trying to set up poly-wise collisions. I call D3DXIntersect to test for intersection, and it has a faceIndex return. However, I can't seem to figure out how to turn that faceIndex value into a working face: triangle (p1, p2, p3) or a vertex + normal.

The vertex buffer should store vertices in winding order, so, vertices[faceIndex] should be p1, vertices[faceIndex + 1] p2 and vertices[faceIndex + 2] p3, correct? When I try doing this, I end up with garbage (-0.001327 floats, not sure what that is in hex).

So, I'm can anyone show me the correct way to get the value of the fave at the given index from a mesh?

Edit: Another thing, is that using the vertex buffer directly requires that you know the FVF of the mesh, which could in theory change... I'm not sure how to set it up so that you always use the correct FVF structure either.