Archived

This topic is now archived and is closed to further replies.

baldurk

collision detection

Recommended Posts

Techmage    122
I good first pass check is to use bounding spheres. very fast, and can tell you if you should check a particular object with more accuracy. just give all objects a CENTER and a RADIUS. check the distance between the 2 center points, and subtract the sum of the radius. if the result is <= 0 you MAY have a collision and should do a better check. Otherwise your cool.

result=distance-(r1+r2)
IF result<=0 then CheckBetter;

Share this post


Link to post
Share on other sites