Sign in to follow this  

2D Collision Detection for Physics Demo

This topic is 4150 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 developing a 2D Physics Engine [c++] (simple, lately I've been doing huge and unrealistic projects, so this one I'll finish since it won't be too complex). I've got drawing, input, and everything I need (I've taken physics classes and know how to implement it), but what I don't have is a way to detect collisions. I've searched and seen a lot of posts about the SAT method and the Polycolly demo, and I'm definately going to try them out, as they look promising. But they only deal with convex polygons. Some polygons that I would like to use will be concave(like maybe an L shaped box). Is there a simple way to do this, either with SAT or some other method?

Share this post


Link to post
Share on other sites
The method I know is break your concave polygon in two or more convex polygons and then simply use SAT the same way you use for convex polygons.

Share this post


Link to post
Share on other sites
Thanks, I was thinking in school today about this, and thought of something like that but wasn't sure if it would work. I'll start to learn the SAT, and then see if I can get it to work. If I have troubles...I'll be back. Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this