Chapter 10

Collision Detection

You use collision detection to determine whether objects in the game world intersect with each other. While earlier chapters discuss some basic ways to check for collisions, this chapter takes a deeper look at the topic. This chapter first introduces the basic geometric types commonly used in games and then covers the calculation of intersection between these types. It concludes with a discussion of how to incorporate collisions into game behavior.

Geometric Types

Collision detection for games utilizes several different concepts from geometry and linear algebra. This section covers some fundamental geometric types commonly used in games, such as line segments, planes, and boxes. Each geometric type discussed here ...

Get Game Programming in C++: Creating 3D Games, First Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.