• Advertisement

Archived

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

Advanced collision detection

This topic is 5714 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''m working on a 2d simulation of rigid body dynamics. This means a bunch of polygons that are supposed to bounce against each other and requires polygon-polygon collision detection. I want to simulate torque to get accurate spinning effects. Anyway, the algorithm i use for collision detection is described on the top of this page: http://www.gamasutra.com/features/20000210/lander_02.htm ("Don''t cross that line" paragraph). The problem is that this algorith only tells you if you are inside or outside the polygon. Since i want accurate physics i need to know what edge/vertex (the two possible types of collisions are vertex-edge and vertex-vertex) a certain corner of a certain poly collided with. Therefore i need to know the points at which the attacking corner penetrates the the polygon. I do this by modifying the above algo to report not only if a point is inside or outside a poly but also if it is on an edge or on a corner. I use a tolerance value so that the point doesn''t have to be _exactly_ on the corner/edge. Anyway, the problem is that this doesn''t work very well. Collisions are often not detected. Now that you know what requirements i have on my collision detection algo, does anyone have any tips of another algo i can use?

Share this post


Link to post
Share on other sites
Advertisement
Drirk,

Please search the forum archives for collision detection. You''ll find quite a few threads dealing with similar questions.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

Share this post


Link to post
Share on other sites

  • Advertisement