Faster Collisions Circles or Squares? Advice. (Fixed)

Started by
12 comments, last by Atrix256 14 years, 7 months ago
Now that the question is resolved, I would like to make a comment:

When you were describing the distance formula, I actually was momentarily lost. You won't have to worry about losing most of the people on here if you simply state the formula, because most people on here know what it is.(square root((x2-x1)^2+(y2-y1)^2) is a good way to do it.)

Thank you.
-----------------------Are you breaking into the world of game development, and are finding yourself lost?I am also a beginner, whose here to get lost-and find his way back-for you. Check out my blog You will(hopefully) learn bunches, alongside me.*Last update: 1/1/10*New Theme!
Advertisement
Well I started looking over your code Captain P thinking it would not work for some reason I seem to have a terrible time getting to grips with a relatively simple concept and im not entirely sure why myself. I had the preconception that the code would only meet all the conditions if one square was ontop of the other I had to do example to get it through my head. But yes thank you for pointing out how terribly unnecessary that would have been.

I will include a formula representation of anything I am going over in the future calculations Aezon :)
Out of curiosity what does AABB stand for?
it stands for "Axis aligned bounding box". An AABB is made up of a minimum point and a maximum point and the walls of the box are all paralel with an axis but it doesn't have to be square.

you might also see another term "OBB" which stands for "Oriented bounding box" which is just a rotated AABB.

HTH! (:

This topic is closed to new replies.

Advertisement