Game Development Reference
In-Depth Information
Contact normal is different from the vector between objects in contact.
The change we must make to resolve a collision is a change in velocity only. So far
in the physics engine we've only made changes to velocity using acceleration. If the
acceleration is applied for a long time, there will be a larger change in velocity. Here
the changes are instant: the velocities immediately take on new values.
Recall that applying a force changes the acceleration of an object. If we instantly
change the force, the acceleration instantly changes too. We can think of acting on
an object to change its velocity in a similar way. Rather than a force, this is called an
“impulse”: an instantaneous change in velocity. In the same way that we have
m p
for forces, we have
for impulses, g . Impulses are often written with the letter p ;Iwilluse g to avoid
confusion with the position of the object p .
There is a major difference, however, between force and impulse. An object has
no acceleration unless it is being acted on by a force: we can work out the total accel-
eration by combining all the forces using D'Alembert's principle. On the other hand,
an object will continue to have a velocity even if no impulses (or forces) are acting on
it. The impulse therefore changes the velocity; it is not completely responsible for the
velocity. We can combine impulses using D'Alembert's principle, but the result will
Search Nedrilad ::

Custom Search