Chapter 5. Collisions

Now that you understand the motion of particles and rigid bodies, you need to consider what happens when they run into each other. That’s what we’ll address in this chapter; specifically, we’ll show you how to handle particle and, more interestingly, rigid-body collision response.

Before moving forward, we need to make a distinction between collision detection and collision response. Collision detection is a computational geometry problem involving the determination of whether and where two or more objects have collided. Collision response is a kinetics problem involving the motion of two or more objects after they have collided. While the two problems are intimately related, we’ll focus solely on the problem of collision response in this chapter. Later, in Chapter 7 through Chapter 13, we’ll show you how to implement collision detection and response in various real-time simulations, which draw upon concepts presented in this chapter.

Our treatment of rigid-body collision response in this chapter is based on classical (Newtonian) impact principles. Here, colliding bodies are treated as rigid irrespective of their construction and material. As in earlier chapters, the rigid bodies discussed here do not change shape even upon impact. This, of course, is an idealization. You know from your everyday experience that when objects collide they dent, bend, compress, or crumple. For example, when a baseball strikes a bat, it may compress as much as three-quarters of an ...

Get Physics for Game Developers, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.