Jump to content
  • Advertisement
Sign in to follow this  
Alessandro

Suggestions needed for point to mesh collision detection

This topic is 2524 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

I would like to test if a point collide with a mesh made of triangles. The mesh object can be arbitrary (a truck, a head, a baseball bat or else).

I was thinking to to a preliminary point to bounding box test to see if the point intersects it. If it does, than I could do a further collision detection.

How would I go for it? Projecting a ray that intersect each triangle normal? And check if the distance if > or < than 0 ?

Share this post


Link to post
Share on other sites
Advertisement
Just thinking out loud.

A point is inside a convex polygon mesh if the point is on the negative side of all the face planes.

You could decompose your model into a bunch of convex groups and check those.

The initial bounding box test is a good idea. You may be able to use a hierarchy of them to quickly approach a solution.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!