Chapter 6. The World in Action: Handling Collisions
Collision detection is a fundamental part of any game. Without it, objects would just pass through each other, finding the right height to place figures above the ground would be very difficult, and checking if a bullet hits its target would be a trial.
To make sure we get a good understanding of collision detection, we'll talk about:
- Collision basics: Our first collision system
- Creating inter-cycle collisions
- Using BitMasks to organize collisions
- Using PythonTags to get colliding objects
- Setting up ground collision
- Overview of additional collision solids and handlers
Covering these topics will allow us to fully understand how the collision system works, and how we can use it.
Collision basics: Our first collision system
Before we dive into creating collisions in our game, we need to talk a little bit about the collision system in Panda3D or we're going to get in over our heads and get confused. To do that, we'll start with a little example of the collision system.