Game Development Reference
In-Depth Information
Types of Collisions
The two types of collisions that we will consider in this section are a normal collision and a
penetrating collision. A normal collision is where the two objects' bounding spheres collide at their
boundaries within the collision tolerance level. (See Figure 5-18 .)
CollisionDistance = 0
m_CollisionNormal
m_RelativeVelocity
RelativeVelocityNormal < 0.0
COLLISION
Figure 5-18. Collision
A penetrating collision is where the two objects' boundary spheres are overlapping and both spheres
are moving toward each other. The two spheres are moving toward each other because the collision
normal and the relative velocity between the two spheres point in different directions. That is, their
dot product is less than 0. (See Figure 5-19 .)
CollisionDistance < -m_CollisionTolerance
m_CollisionNormal
m_RelativeVelocity
RelativeVelocityNormal < 0.0
PENETRATING_COLLISION
Figure 5-19. Penetrating collision
 
Search WWH ::




Custom Search