DefenseTech.org has a nice little article explaining how the new defensive gun on the V-22 Osprey works. The operator inside the aircraft sees through the sights using a TV monitor, puts the crosshairs on the target and fires. A computer system figures out where to actually point the gun to account for movement of the aircraft so the rounds land in the right place.