Game Development Reference
In-Depth Information
Damage indicators provide a mechanism to convey to the player where damage is coming
from, it's particularly useful in first person games since we are not always able to see all
around us, if the player is taking damage from behind we need to bring this to his attention
before it's too late. Many games display this information around the weapon's crosshair, or
around the edges of the screen. The approach we will use works well in either case.
Figure 61 illustrates the situation, on the right we have the player walking in the game, on the left is the world as seen by the player. We will rep-
resent damage using a vector v which defines the direction from where the damage is coming from, in this case it's the player's back left side. We
need to bring this information and map it onto the player's view to tell him that he is incurring damage from somewhere behind and towards the
Let's begin by approaching this mathematically, what we are doing is moving from one co-
ordinate system to another, from the 3D world space coordinate system where the player
received damage to a screen aligned coordinate system where we will display information
space and make it relative to the center of the screen.
Search WWH ::

Custom Search