Game Development Reference
In-Depth Information
perpendicular to the normal is the same before and after the collision. We
would expect an object like a beanbag to scrub off a great deal of horizontal
velocity as a result of the collision—in fact, it might come to a stop com-
pletely. The correct thing to do is to add in a perpendicular component to
the impulse. However, correct handling of friction is, in general, a tricky
business, and it remains at the forefront of real-time simulation research.
Many current methods for calculating the horizontal impulse (especially for
sliding contact) fall under the category of “completely fudged.”
In the previous example, we only had one “live” object and the other
object was inert. This is a special case, and the equations could be sim-
plified. (As we mentioned earlier, the mass of the projectile cancels itself
out and is not needed.) In Exercise 9, we ask you to consider what would
happen if Grant and Kari's collision were not perfectly inelastic; the full
power of this law is needed in this case. We show how to handle collisions
where the objects are free to rotate in Section 12.5.4.
We have been assuming thus far that the objects are in contact, but are
not yet penetrating. This might not be the case, depending on the overall
strategy used to resolve collisions. One technique is to attempt to reverse
the simulation in time back to the point of contact. This can be di cult
to do e ciently because there are frequently many, many collisions that
happen at different times within a single time step. Furthermore, defining
“exactly in contact” is di cult when using floating point math. Another
strategy is to simply allow penetration, and apply the impulse to objects
that are already penetrating. In this case, the impulse must do more than
remove the relative velocity to prevent (further) penetration. The resulting
relative velocity must be su ciently large to separate the objects by the
end of the time step, after it has been integrated into the position. In other
words, the positions of the objects will be advanced at a rate according
to the calculated velocities; after this update, the penetration needs to
be resolved. Or at least it needs to be mostly resolved. There are some
advantages to allowing some small penetration. All of these issues are a bit
outside the realm of established principles and fall more under the heading
of current research, 17 and they will not be discussed here.
12.4.3 The Dirac Delta
Before we leave linear dynamics and talk about rotational dynamics, let's
mention briefly one bit of mathematical notation you might see, especially
in the context of impulses. As we've said, many natural phenomena (such
as momentum) do not change instantaneously in theory, but for practical
purposes we treat them as changing instantaneously. Furthermore, it is
17 As Werner von Braun, who really was a rocket scientist, said, “Research is what I'm
doing when I don't know what I'm doing.”
Search WWH ::




Custom Search