Quote:Original post by mrbig
Ok Alvaro, so not all of you got it all wrong.
Does that really matter?
Solving 2nd degree equations 400 times per pair of objects each frame doesn't sound like a good idea to me.
Mr. Rowl, whether the direction is specific or arbitrary doesn't matter.
That way or another, there are no wrong questions, only wrong answers.
Why would you have to perform this 400 times per pair, surely once would be enough? The trick to fast collision detection isn't so much in the speed of the intersection test itself but rather in the method you use to cull the number of tests you have to perform anyway. Even so, solving such an equation isn't such a costly operation. If you have many objects what you want to do is use spatial partitioning and/or take advantage of temporal coherence in order to make the time taken as linearly dependant on the number of objects as possible rather than being an n squared process which results from brute force. I recommend you look into collision culling methods such as 'sweep and prune' and 'quad trees' before you start worrying about saving a few cycles on the actual narrow phase intersection test used.
And for the record whether the direction is specific or arbitrary is far from insignificant. In fact I'd say that is the sole reason why you perceive one answer to be correct and the others wrong.