Game Development Reference
In-Depth Information
Details on Specific Types of Projectiles
So far in this chapter, the discussion has focused on the general physics of projectile trajecto-
ries. The equations that we explored to model drag, wind, and spin can be applied to any type
of projectile. In the last main section of this chapter, we will turn our attention to the specific
modeling issues associated with some specific types of projectiles that are commonly used in
game programming applications.
Bullets
Guns and bullets are common features in combat and adventure game applications. Bullets
are small, relatively heavy (for their size) projectiles that travel initially at high speeds. The
forces that act upon a bullet in flight include gravity, drag, and wind, forces that we have previ-
ously discussed. Bullets are generally given a spin as they leave the muzzle to enhance the
stability of the bullet in fight. The spin is about the longitudinal axis of the bullet, parallel to the
direction of flight, so the Magnus force that results from bullet spin is small and can generally
be ignored.
When bullets fly through the air, the nose of the bullet will usually not point precisely in
the same direction that the bullet is traveling. As shown in Figure 5-19, the angle, d , between
where the nose of the bullet is pointing and its velocity vector is called a yaw angle. The value
of yaw for most bullets is relatively small, on the order of a few degrees.
Figure 5-19. Bullets usually have a yaw angle during flight.
If the yaw angle becomes large, the bullet will become unstable and will begin to tumble in
flight. To counteract the effect of yaw, modern gun barrels are rifled —spiral grooves are cut
into the barrel. Rifling imparts a spin to the bullet as it travels down the barrel. The spin helps
to stabilize the bullet during flight and helps to keep the yaw angle down to a stable value.
Unless you are programming a super-accurate bullet simulation, you can probably ignore
the effects of yaw and spin on the flight of the bullet. For general game programming appli-
cations, it is probably acceptable to focus on gravity, drag, and wind as the forces that will act
upon the bullet in flight. Therefore, factors that will influence a bullet in flight are the following:
The initial velocity of the bullet
The angle at which the bullet is fired
The initial height of the bullet
The drag coefficient of the bullet
The mass of the bullet
Search WWH ::




Custom Search