Game Development Reference
In-Depth Information
15
R ESTING C ONTACTS
AND F RICTION
detector finds pairs of objects that are touching (i.e., in contact) or interpen-
etrating. The collision resolution algorithm manipulates these objects in physically
believable ways.
From this point on I will make a distinction between the two terms: a contact is
any location in which objects are touching or interpenetrating; a collision is a type of
contact, one in which the objects are moving together at speed (this is also called an
“impact” in some physics systems). This chapter introduces another type of contact:
the resting contact. This is a contact where the objects involved are moving neither
apart nor together.
For the sake of completeness there is a third type of contact, the separating con-
tact, where the objects involved are already moving apart. There is no need to perform
any kind of velocity resolution on a separating contact, so it is often ignored.
The collisions we've seen up to this point are relatively easy to handle: the two
objects collide briefly and then go on their own way again. At the point of contact we
calculate an impulse that causes the contact to turn from a collision into a separating
contact (if the coefficient of restitution is greater than zero) or a resting contact (if it
is exactly zero).
When two objects are in contact for a longer period of time (i.e., longer than a
single physics update), they are said to have resting contact. In this case they need to
be kept apart while making sure each object behaves normally.
So far I've used the terms contacts and collisions interchangeably. The collision
Search Nedrilad ::




Custom Search