Game Development Reference
In-Depth Information
Figure 5-2. Force diagram for the gravity-only model
The advantage of the gravity-only model is its simplicity. As we saw in Chapter 4, if the
force applied to an object is constant, then the velocity and location of the object as a function
of time are described by simple algebraic equations. There is no need to use an ODE solver with
the gravity-only model. The disadvantage of the gravity-only model is that it's only accurate
for a limited number of situations because it leaves out the effects of aerodynamic drag, wind,
and spin.
Force and Acceleration Equations
As seen in Figure 5-2, the only force in the gravity-only model is due to gravity. The force of
gravity acts in the vertical, or z-, direction. There are no forces acting on the projectile in the x- or
y-directions. The force equations for the gravity-only model are shown in Equation (5.3).
F
=
0
(5.3a)
F
=
0
(5.3b)
z F
=−
g
(5.3c)
The negative sign on the F z force component in Equation (5.3c) indicates that gravity acts
downwards towards the ground. The gravity-only model assumes there is no net torque on the
projectile and that whatever rotation the projectile has does not affect its trajectory. Therefore,
the equations of rotational motion are not included in the gravity-only model.
The acceleration equations are obtained from the force equations and Newton's second
law. If the mass of the projectile is constant, which it will be in most situations, the acceleration
equations are found by simply dividing the force equations by the mass, m , of the projectile.
The acceleration equations for the gravity-only model are shown in Equation (5.4).
a
=
0
(5.4a)
x
a
=
0
(5.4b)
y
a
=−
g
(5.4c)
z
 
Search WWH ::




Custom Search