Game Development Reference
In-Depth Information
Figure 67 - Radially constrained minimap.
we want the player's orientation as if we were looking directly down at him from way up
above his head. This will depend a lot on the type of game we are making. If we assume
this is a 3D first person game we can get the forward vector of the camera's world trans-
formation and calculate the angle in radians ignoring the up component of the vector.
Given the player's forward vector v
We start by rotating the angle by π/2 to orient it up, then we use the atan2 function to cal-
culate the value of the arc tangent.
Search WWH ::

Custom Search