Game Development Reference
In-Depth Information
Figure 18-2. Hitting lower than expected
Zeroing the Sights
The idea of zeroing the sights is probably the most important thing to model if you want
to have realistic gunplay in your game. As we mentioned before, when players are run‐
ning from room to room, they probably don't want to be thinking about the wind and
the range. However, for a hunting simulation or a sniper game, it may be appropriate
to introduce this.
When a person is looking through a scope, her body and the rifle become a rigid body
so that to change the aim of the weapon, she must rotate her entire body. This is con‐
venient for us, because the player generally controls the shooter's position with his left
hand via the keyboard and the direction of aim with the right hand. Other methods of
aiming, briefly described previously as free aim, don't really have a counterpart in the
real world, so we'll be limiting ourselves to this solid-body aiming.
Bullet drop: Gravity and air resistance
If you are aiming a rifle horizontally, you might expect that the bullet leaves the muzzle
horizontally, and that gravity and air resistance cause it to drop from there. Figure 18-3
 
Search Nedrilad ::




Custom Search