   Swept circle-circle collision
  I'm trying to implement the parametric approach explained here: http://www.gamedev.net/community/forums/topic.asp?topic_id=362382The idea is to get the circles movement parametric equations (in this case, the movement is a straight line) and find t when they touch, that is, when the distance between the centers is equal to the sum of their radii.Expanding the equation presented in the previous topic:|(C0+tV0-C1-tV1))|^2 = (r0+r1)^2I got to a quadratic equation with parametersa = deltaV.dot(deltaV)b = 2*deltaC.dot(deltaV)c = deltaC.dot(deltaC)  - (r0+r1)^2where deltaV = V0-V1,deltaC = C0-C1,dot() is the dot product operationI just need to solve the equation to get the intersection time (t = min(t1, t2), t>=0). If b^2-4ac < 0, there is no intersection.Anyone may confirm if this is right? This code sometimes gets the collision right, but several times it doesnt, so I'm obviously doing something wrong. Are there any additional preconditions, besides that the circles movement is a straight line?Thanks in advance.   
  No that seems perfectly fine, are you sure you're choosing the correct value for t?To choose you might be do something like:find ta,tbif(ta<0||ta>1) { if(tb<0||tb>1) {} //no collision use tb}else if(tb<0||ta<tb) use taelse use tb   ;  That equation looks correct. I'd say you have a logic or code bug somewhere.the solve part should be...d = b*b - (4 * a * c);if(d < 0.0f) return false;t0 = (-b - sqrt(d)) / (2 * a);t1 = (-b + sqrt(d)) / (2 * a);if(t0 > t1) swap(t0, t1);if (t0 > tmax || t1 < tmin) return false;[Edited by - oliii on April 23, 2010 6:59:19 AM]