Game Development Reference
In-Depth Information
velocity increases, so does drag since drag is a function of velocity. At some speed the
drag force retarding the object's motion will increase to a point where it is equal to the
gravitational force that's pulling the object toward the earth. In the absence of any other
forces that may affect motion, the net acceleration on the object is 0, and it continues
its descent at the constant terminal velocity.
Let us illustrate this further. Go back to the formula we derived for the y component
(vertical component) of velocity for the projectile modeled in the Cannon2 example.
Here it is again so you don't have to flip back to Chapter 4 :
v y2 = (1 / C d ) e (-C d /m)t (C d v y1 + m g) - (m g) / C d
It isn't obvious from looking at this equation, but the velocity component, v y2 , asymptotes
to some constant value as time increases. To help you visualize this, we've plotted this
equation, as shown in Figure 6-11 .
Figure 6-11. Terminal velocity
As you can see, over time the velocity reaches a maximum absolute value of about
−107.25 speed units. The negative velocities indicate that the velocity is in the negative
y-direction—that is, the object is falling toward the earth in this case. (For this calcu‐
lation we arbitrarily assumed a mass of 100, a drag coefficient of 30, and an initial velocity
of 0.)
Assuming an initial velocity of 0 and equating the formula for total resistance shown
earlier to the weight of an object, you can derive the following formula for terminal
velocity for an object in free fall:
2 mg
C d ρA
v t =