Jump to content
  • Advertisement
Sign in to follow this  
dgmul

2D concave polygon collision detection

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

Hey there! :) I'm currently working on a 2D physics engine which operates on polygons, concave as well as convex. I've got most of it down; I'm calculating the inertia properly, I know how I'm going to handle a collision reaction, etc. I'm just stuck on collision detection. I've googled, but I can't seem to find anything particularly relevant. All of my results seem to be exclusively focusing on convex polygons which apparently have different properties. I'd like a collision detection algorithm (or series of algorithms) that handles collision detection for any irregular concave polygons (moving linearly as well as angularly), and calculates the exact point of contact, and also preferably can deal with high speeds. I hope I can get past this annoying collision detection issue so that I can get on to the fun stuff... :D Initially, I hadn't expected collision detection to be a toughie for some reason. Any tips & advice are appreciated! Peace and love, dgm

Share this post


Link to post
Share on other sites
Advertisement
Separating axis theorem will work for everything you've mentioned. It only works for convex polygons, but that's not a problem since you can simply split any concave polygon into a series of convex ones.

Check out oliii's posts here and the tutorial made by the N guys, links are in this thread.

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.

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!