Tips For Optimizing Collision
Collision In Computers In the world of games the logic for detecting collision can either make or break your game. There are many different methods for detecting collision which are dependent on what you are trying to collide. For instance, if you try to collide two squares then you can just see if the left/right/top/bottom side of either shape simply overlaps the sides of the other which is known as AABB collision detection. The same logic applies in 3D space except instead of having to deal with an XY point you have to handle the Z dimension as well. On the other hand, if you want to collide two circles or spheres then you need to check to see if the distance between the centers of each circle (or sphere in 3D) is less than the radius of the two shapes. These are pretty simple scenarios, but collision can become rather complex when you have to begin dealing with collision between different shapes such has colliding a square with a circle. You cannot use the circle collision logi...