Regardless of whether you are programming 2D or 3D games, collision detection based on bounding box is straightforward, i simple and easy to understand. You can imagine that every object is individually covered by a box. The boxes are moving along with the corresponding boxes; when the boxes collide, the objects collide too. The boxes are called the
BoundingBox. To compose the
BoundingBox, you only need to go through all the points or vertices, and then find the min and max ones. After that, the
BoundingBox collision detection will depend on the min and max information of every
BoundingBox to examine whether their min and max values are inside its own range to make the collision decision. ...