Jump to content
  • Advertisement

Archived

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

baldurk

collision detection

This topic is 6439 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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;

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!