Changing how much of the screen a Camera renders
Often, we want different parts of the screen to display different things to the player. For example, the top of the screen might be game statistics, such as scores, lives, or pickups. The main area of the screen might show a first- or third-person view of the gameplay, and we might also have a part of the screen showing additional information, such as radars and minimaps.
In this recipe, we’ll create two cameras to add to our player’s view:
- The Main Camera: This is made a child of the third-person-controller character. This shows the main gameplay to the player.
- Camera 2: This is the elapsed time display that covers the top 15% of the screen. Note that there is no gameplay going on behind the text.
- Camera 3: This is a simple minimap located at the bottom left of the screen, created from a top-down orthographic (non-perspective) Camera:
Figure 13.11: Cameras rendering to different...