Archived

This topic is now archived and is closed to further replies.

Mr_Pinner

Contact Normals

Recommended Posts

Hi all, I''m half way through developing my own physics engine and have come accross ANOTHER problem. :-( The question is does anyone have a neat trick for calculating a suitable contact normal from a pair of intersecting triangles. Aswell as the tri geometry, tri velocities are olso available. Working out whether or not a point of one tri intersected another is a peice of cake... trying to work the edges isnt quite as straight forward. Any ideas?? Does anyone know how ODE does it?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you mean the edge of one triangle against the edge of another, I would think a simple cross product of the edges would give you a good normal. Or, if they are parallel, cross the edge of one triangle with the norm of the other.

Share this post


Link to post
Share on other sites
yeah i agree. given two edges the normal will be the cross product.

The problem is probably better stated as... given a pair of intersecting triangles, how do i decide whether a point/face collision occured or whether an edge/edge collision occured. If an edge/edge then which pair??

Thanks for your reply.

Share this post


Link to post
Share on other sites
quote:
Original post by Mr_Pinner

The problem is probably better stated as... given a pair of intersecting triangles, how do i decide whether a point/face collision occured or whether an edge/edge collision occured. If an edge/edge then which pair??




Whichever is the minimum distance. If you need functions to calc the minimum distance between vertex/face and edge/edge, check out www.magicsoftware.com

Share this post


Link to post
Share on other sites