Game Development Reference
In-Depth Information
To study projectile mo-
tion where acceleration is
solely due to gravity, which
is a constant and acts along
a cardinal axis, let's estab-
lish a 2D coordinate space
where +y is up and x is
the horizontal axis. With-
out loss of generality we can
rotate our plane such that
it contains the initial veloc-
ity, and thus the entire tra-
jectory of the particle. We
choose +x in the horizontal
direction of the initial veloc-
ity. We also simplify things
by setting the origin at the object's initial position. This notation (along
with a few other items that we'll need in a moment) are illustrated in
Figure 11.13.
Reviewing the notation in Figure 11.13, we see that we can express the
position of the particle as a function of time either as p (t), or we can refer
to an individual coordinate with x(t) and y(t). Instantaneous velocity (not
shown on the diagram), can be denoted in vector form either as v (t) or
using derivative notation as p (t). The scalar velocity components will be
denoted using derivative notation as x(t) and y(t). The initial position and
velocity will be denoted by adding a subscript 0 ( y 0 is the initial vertical
velocity). We denote the acceleration due to gravity as either g or g .
Let's state the equations for velocity and position using the notation
just described:
V 0 = P 0 = ( X 0 , Y 0 )
S 0 = V 0
+Y
H
P ( T )= ( X ( T ), Y ( T ) )
+X
D
Figure 11.13
Projectile motion
p (t) = v 0 + t g ,
x(t) = x 0 ,
y(t) = y 0 + gt,
(11.20)
p (t) = t v 0 + (t 2 /2) g , x(t) = tx 0 , y(t) = t y 0 + (1/2)gt 2 . (11.21)
The distances labeled h and d in Figure 11.13 are often of interest; they
are the apex height and horizontal travel distance, respectively. As dis-
cussed earlier in a one-dimensional context, the maximum height is reached
when all of the initial velocity in the upwards direction has been consumed
by gravity, in other words when y(t) = 0. This occurs at time
t a = − y 0 /g,
Time to reach apex
 
Search WWH ::




Custom Search