Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Collision detection is the process of determining if two objects intersect. In two dimensions, this involves checking to see if one sprite shares the same pixels as another; in three dimensions, however, things are a bit more complex.
The easiest and most common method for 3D collision detection is done using spheres. Each 3D object is assigned a sphere that wraps the object. Collisions are tested for by calculating the distance between two spheres, and a collision is true if this distance is less than the sum of the radius of both spheres.