Sign in to follow this  
dgmul

2D concave polygon collision detection

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this