   2D dynamic collision detection between ROTATING convex polygons
  (This isn't strictly for a game coding project, but it's closer to game programming than anything else, so I assumed this would still be the right place to post this.)With a dynamic separating axis test, detecting whether two moving convex polygons collide, and the exact time at which they do so, is simple enough...as long as the polygons are just moving in straight lines and not rotating.What I can't find anywhere is how to do the same for (still convex) polygons which are rotating while they're moving. For my purposes this calculation doesn't need to be in real-time. It should still be as fast as possible, but it can be a good deal slower than it would have to be in a game. Soooo yeah. Help on that would be very much appreciated....and while I'm at it, I might as well ask if anyone can point in my in the direction of resources that explain dynamic collision detection for movement on a curve rather than a straight line, and for concave polygons? That's really just a curiosity thing, though. :P   
  Rotation is a transformation that you can apply to a polygon to generate a new polygon (a polygon is, after all, just an ordered list of points, and those can be rotated, translated, scaled, etc.). Let's say you need to collide polygon A, rotated by X degrees, against against polygon B, rotated by Y degrees. All you need to do is runSAT(rotatePolygon(A, X), rotatePolygon(B, Y)). Of course, this ignores things like spin; the results you'll get from SAT will just be the standard ejection vector + distance results you normally get. It'll be up to you to interpret them in a rotating reference frame. For movement on a curve, you can of course discretize the curve (break it down into short straight segments). You pay extra time, and gain collision detection accuracy, proportional to how many segments you break it down into. More generally, you can try sweeping your object's polygon along its motion vector to generate a new shape that can be collided against. For example, if your polygon is a unit square and it's moving along the vector (0, 2), then you sweep it along that vector and generate a new polygon that's a rectangle with height 3 and width 1. This makes interpreting collision detection results complicated, though, and you can't sweep a polygon along a curve and still have a polygon at the end. To answer your other question, concave polygons can be broken down into multiple convex polygons, allowing you to run standard SAT tests. I spent a fair amount of time a few years ago trying to make a "perfect" collision detection system. I've come to the conclusion that it isn't worth it. They're way harder to implement, they're slower, and 99.99% of the time they generate results indistinguishable from "imperfect" systems.   ;  I think the OP is asking about how to handle swept collision for the case of general rigid motion -- rotating and translating convex shapes, rather than just translating.You should look at Box2D which implements this using "conservative advancement".Some links:http://www.box2d.org/forum/viewtopic.php?f=3&t=606http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=4&t=1710http://www.continuousphysics.com/BulletContinuousCollisionDetection.pdf[Edited by - raigan on May 25, 2010 11:54:46 AM];  ...hm. Thanks, you've both been quite helpful. Box2D is...enlightening.   