Game Development Reference
In-Depth Information
• When the target is at a level higher than the launch point
• When the target is at a level lower than the launch point
• When the projectile is dropped from a moving system (like an airplane) above the
target
In the first type of problem, the launch point and the target point are located on the
same horizontal plane. In Figure 6-1 , v 0 is the initial velocity of the projectile at the time
of launch, φ is the launch angle, R is the range of the projectile, and h is the height of
the apex of the trajectory.
Figure 6-1. Target and launch point at same level
To solve this type of problem, use the formulas shown in Table 6-1 . Note, in these
formulas t represents any time instant after launch, and T represents the total time from
launch to impact.
Table 6-1. Formulas—target and launch point at same level
To calculate:
Use this formula:
x(t)
(v o cos φ) t
y(t)
(v o sin φ) t - (g t 2 ) / 2
v x (t)
v o cos φ
v y (t)
v o sin φ - g t
v(t)
v 0 2
- 2 gtv 0 sin φ + g 2 t 2
h
(v o 2 sin 2 φ) / (2 g)
R
v o T cos φ
T
(2 v o sin φ) / g
Remember to keep your units consistent when applying these formulas. If you are
working in the SI (metric) system, length and distance values should be in meters (m);