Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Collision Detection

Chapter 7. Collision Detection

Collision detection is very important to any virtual world programmer. Collision detection is where a program determines whether two or more objects have intersected with each other. Collision detection is used in virtual worlds to determine whether a character is walking into a particular area of the world or picking up an object. In games, collision detection is used to determine whether a player has achieved a goal in the game. For example, successfully shooting an enemy, or successfully collecting an object in the game that gives the player special powers or points. There are many examples where objects in virtual worlds come in contact with one another, and therefore cause a collision.

Collision detection is a popular topic in gaming communities, and there are several methods that are used for collision detection in games. Some of these methods include the bounding box and bounding sphere methods. These methods use an imaginary box or sphere that encloses each object in the world. The goal for collision detection is to determine whether the imaginary shape of one object intersects with the imaginary shape of another object. There are other more sophisticated techniques available and others being developed all of the time.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint