It seems like every now and again we see a common question come up around the boards. Over the years (as I said its been a while) we have had little code snipit competitions (no real winners) and I thought this would be a good one. The solution I provided will work and works fairly quickly. So, its just a little bit of fun more than anything.

Collision detection always comes up in games, circle->circle, circle->segment, point->poly, and segment->poly (thus circle to poly) are fairly simple to implement in an extremely fast routine. Poly->Poly both convex and concave on the other hand takes some serious thought and math (in many cases). So, what better

The "best" solution I've seen (and one I've implemented myself if you look around) is tracing one shape onto another shape (can be pre-calculated) and then using distance to see if there is a collision. Its extremely fast and accurate, has the added advantage of being able to easily be modified for use over time shifts too . But its WAY outside the scope of this.

- Jeremy