Thanks for the post guys however, I already stated that what I need is a detection for two moving circles; I also said that if they're two static circles, I won't have any problem at all (the square of the distance formula is pretty basic).

To illustrate why I cannot use the distance formula for two moving circles, I'll present a simple case:

1) There are two degenerate circles, A(0,0) and B(0,7)

2) To make the problem simpler, let's say that B is stationary while A is moving at a velocity of V(0, 10)

3) Will they hit? Yes of course.

4) using the square of the distance formula:

a) before movement ( (A.x-B.x)*(A.x-B.x) + (A.y-B.y)*(A.y-B.y) ) = 0*0 + 7*7 = 49 which is greater than 0

b) after movement ( (A.x-B.x)*(A.x-B.x) + ( (A.y + V.y)-B.y) * ( (A.y + V.y)-B.y) ) = 0*0 + 3*3 = 9 which is also greater than 0

Therefore, the distance formula will not work in this case

5) Let's say that the given velocity is not "fine" enough, meaning, it has to be smaller (i.e. 10px / 10frame which should just be 1px/frame). So we'll normalize the movement vector.

a) |V| = V/V.Length = V.x/Length, V.y/Length

b) |V|.x = 0/10 = 0, |V|.y = 10/10 = 1

c) So how do we move? we'll multiply |V| by the original length again... right? if we merely increment A by |V|, we won't reach the required speed we need.

d) So our collision detection will go like this:

for ( float interval = 0.0f, interval < V.Length, interval += 1.0f ) { //A normalized vector will always have a length of 1

if ( ( (A.x+ V.x*interval) - B.x)*( (A.x+ V.x*interval) - B.x) + ( (A.y + V.y*interval)-B.y) * ( (A.y + V.y*interval)-B.y) > 0 ) return false;

return true;

}.

which MAY work (there are other cases which this may not work) but moreover, what if the vector length was large? let's say 50.0f? The loop will grow... and that's not pretty...

6) So enough ranting about the distance formula... I still can't get the algorithm stated in the articles to work