ABSTRACT

In this chapter, we will add a new Entity class to the game engine. One of the new features of the Entity class is the ability to collide with other entities. In addition to colliding, entities will also have the ability to react to collisions. The code for collision detection and reaction will be part of the Entity class. Many of the calculations we need to perform for the collision code will use vectors and vector math, so we will start this chapter by taking a look at vectors.