Determining the Face of a collision
by Owen Ortmayer · in Torque Game Engine · 05/28/2004 (11:23 am) · 3 replies
Is there anyway to determine the face/polygon where an object has registered a collision. My class derives from shapebase. I need the vertices of the face so I can determine the plane it lies within.
I need to do something like:
Im using mConvex.getCollisionInfo(); to get the collision info.
This sets mCollsionList so I can access each registered collision by mCollsionList.collision[i];
The Collision structure has a field for the face, but as stated in the declaration:
So does anyone know of a way to determine the face on the object corresponding to each collision point. Or does it look like I'm going to have to code this in myself.
I need to do something like:
for each collision point determine the face on the object where this collision point lies
Im using mConvex.getCollisionInfo(); to get the collision info.
This sets mCollsionList so I can access each registered collision by mCollsionList.collision[i];
The Collision structure has a field for the face, but as stated in the declaration:
// Face and Face dot are currently only set by the extrudedPolyList // clipper. Values are otherwise undefined. U32 face; // Which face was hit F32 faceDot; // -Dot of face with poly normal
So does anyone know of a way to determine the face on the object corresponding to each collision point. Or does it look like I'm going to have to code this in myself.
About the author
Associate Matt Fairfax
PopCap