Game Development Reference
In-Depth Information
Figure 10.3 A driving game where a waypoint arrow instructs the player to turn
left.
The first step in implementing this type of waypoint arrow is to create an arrow
model that points straight forward when no rotation is applied to it. Then there are
three parameters to keep track of during gameplay: a vector that represents the fa-
cing of the arrow, the screen space location of the arrow, and the current waypoint
the arrow should be tracking.
The facing vector should first be initialized to the axis that travels into the screen.
In a traditional left-handed coordinate system, this will be the +z-axis. The screen
space location of the arrow corresponds to where we want the arrow to be on-
Search WWH ::




Custom Search