Tips For Optimizing Collision
![Image](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl3vK11qRlWiEAiTzTNQLheEUvv_fatSwkHV6gR-4JDNPBmI2EtcSTndpCl_9i_cE2V0m0p1A3JIwtlxbQkJ2QAZiUYiJaFGG0FA92ZK1p-WghCU5-2z4nyZU1eZk2jHT96BQJIqLRtcx8N5vvZ8ntQ-4pDvIpbKyXe9gE32NQ4efNYIN6ywL-YGse1A/s320/EverythingVsEverything.png)
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 logic be