Thanks.
Collision Detection Problem
Maybe I'm totally wrong though! This is just a guess. I really need to get into 3D stuff soon.
1) Check for overlap, if yes goto 2
2) Issue collision event and re-position one or both of the objects so that they no longer overlap. (This is best done by moving them backwards along their movement vectors to the last point where the overlap test fails)
Asuming the objects are no longer moving, they'll not overlap again, and 1) will yield false on the next test..
The problems most people have with this is caused by floating point in-accuracy, so you might want to use a "very small" value X and replace all floating point equality comparisons
if(f1==f2)
with:
if ( abs(f1-f2)
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.