September 2014
Beginner
286 pages
6h 16m
English
In this chapter, we are going to add a physics-based collision detector to our game and create events based on the detected collisions. We are going to learn how to trigger events from different phases of a collision and for specific types of colliding bodies. We will also learn how to handle these collision events and many other events such as "game over".
Finally, we are going to learn how to play sound effects that we prepared earlier in the game during the events to improve their overall feel.
Collisions are an integral part of the physics engine. Algorithms used in Box2D are nicely optimized and we will take advantage of it. However, we will be adding and removing physics bodies ...
Read now
Unlock full access