   Swept Bounding Circles - first collision
  Hi, I finished a sweep and prune function for my collision code, but I'm stuck at one point.My code returns a list of all the overlapping bounding circles  -eg. 1-3, 2-1, 3-4, 2-4But these are using swept circles and each circle can only hit one other circle.  -eg. if 1-3, and 1-4, overlap, I must find whether 1 hits 3 first or whether 1 hits 4 first.Does anyone have a link to some article that discusses this point?When I get lots of objects moving, the interdependencies get really confusing.Thanks a lot  -Cuppo   
This thread contains a somewhat documented algorithm for finding the time of first collision between two spheres. It assumes linear movement between the start position and the end position.   ;  Oops, forgot to mention what I actually had trouble on.Thanks for the code ToohrVyk, I'll take some time to crawl through that. (Objective Caml !!??) My real problem though, is in the broad-phase detection.such as:If the bounding boxes of :1 overlaps 2    and1 overlaps 3say 1 hits 2 before 1 hits 3. You may think aha, therefore 1 collides with 2 and not with 3.However: what if something else (say 4) hits 2 before 1 hits 2? Then the actual collisions are:4 hits 2,and 1 hits 3I'm looking for a fast way to prune all these checks.Has anyone ever read the "Kinetic Sweep and Prune" paper? Does it talk about what I'm looking for? I can't understand it right now, but if it does, I'll try and read it again.Thanks  -Cuppo   