Game Development Reference
In-Depth Information
In line 6 of Listing 2, we declare a floating point number with the value of 1. This will be
the speed of camera movement. The value of
speed
is multiplied by the
delta time
in line
15 to perform a translation on the y axis using
Translate()
function.
Translate()
takes the
displacement values on x, y, and z axes. Notice that we provided a non-zero value for the
y axis only, since we don't want to move the camera on neither x nor z axes.