Advertisement

collision detection

Started by November 01, 2000 02:13 PM
1 comment, last by baldurk 24 years ago
sorry about the quickness but how do you do collision detection and what are the others for VK_DOWN, VK_UP and so on?? thanks
You detect collision by intersections and what about the others ??
Advertisement
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;

This topic is closed to new replies.

Advertisement