Collision detection
To explain it simply, collision is a short duration interaction between two bodies. There are many different types of collisions such as elastic and non-elastic. The study of the intersection of two or more objects overlapping each other is called as collision detection. It is one of the most complex pieces of computational mathematics and is divided into many types, such as:
- Bounding Box Collision: This is the simplest form of collision techniques wherein we take two rectangles and check for collision if they overlap each other. For this, we need four coordinates of each rectangle, namely, the x and y position and width and height of both rectangles.
- Circle Collision:Â This is the second simplest type of collision wherein we test for collisions between two circles. Here, the radius of two circles and x and y position of the center of the circles are taken into account to test for overlapping.
- Separating Axis Theorem: This type of collision is a bit more complex than the...