Unlike the bounding box, bounding sphere based collision detection is faster. The technique just needs to compute the length between two points or vertices whether less, equal, or greater than the sum of radii. In modern games, bounding sphere based collision detection is preferred rather than the bounding box. In this recipe, you will learn how to use the technique in an XNA application.
Follow the steps below to master the technique of using
BoundingSphere in your game:
BoundingSphereCollisionGame.cs. Then, create a Content Pipeline Extension Library named