Jump to content

  • Log In with Google      Sign In   
  • Create Account

Suggestions needed for point to mesh collision detection


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Alessandro   Members   -  Reputation: 296

Like
0Likes
Like

Posted 14 January 2012 - 06:41 AM

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 ?

Sponsor:

#2 bzroom   Members   -  Reputation: 647

Like
0Likes
Like

Posted 15 January 2012 - 04:55 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS