Jump to content
  • Advertisement


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


Advanced collision detection

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

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

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!