I could write an entire book on the kinds of 2D collision detection available to us, let alone the number available for collision detection in 3D. I have written several TypeScript tutorials on how to use different detection techniques, both basic and sophisticated at https://www.embed.com/typescript-games/basic-collision-detection.html, but, in this book, we will stick to using a combination of some of the more basic collision techniques.
Types of 2D collision detection
Circle collision detection
The most basic kind of collision detection is circle or distance collision detection. If we treat all of our colliders like little circles with a radius and a position, we can calculate the distance between the two locations and...