If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Rigid Body Collision Detection

For those of you who are trying to pull off collisions between 2D convex polygons accurately at any convex shape or angle, then have I got something for you. I tried to make it as simple as possible, so figuring it out or converting to another language, or graphics library like DX/OpenGL, shouldn't be a problem.

It simply uses the Separation Axes Theorem, although most of code came from Chapter 1 of this rigid body 2D physics tutorial (which is in C++):

Here's another one I uploaded, only this time, the polygons cannot pass through each other thanks to collision response. I modified some of the other functions and added a couple new ones to allow this response to happen.