Game Development Reference
In-Depth Information
The camera in car racing games follows the car at a specific distance behind it, and it has
also a specific height above the vertical position of the car. Additionally the rotation of the
camera after the car turns is not immediate, but rather has some latency, and has a speed
less than the turn speed of the car. So if the car turns for long time, a part of its side will
become visible to the player as in Illustration 26. This script we are going to add to the
camera is
CarCamera
in Listing 13.