CHAPTER 11

image

Collisions

This chapter deals with an important subject that is bound to crop up in any animation or simulation: collisions. More precisely, it focuses primarily on collision resolution—how to respond to collision events—and less on collision detection. Both collision detection and collision resolution are vast subjects in their own right. The intricacies of collision detection for general objects are outside the scope of this book (because we focus on the physics governing motion), but the situation is much simpler for collisions between particles, which is the main subject of this chapter. Similarly, it is impossible to cover all ...

Get Physics for JavaScript Games, Animation, and Simulations: with HTML5 Canvas 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.