Creating a mini-map
InChapter 5, Lights, Cameras, and Shadows, you learned about how to use cameras for mini-maps. In this section, we will implement a mini-map for our game. This mini-map will provide a top-down view of our game, centered on the sandbox area you created in Chapter 8, Implementing Our Non-Player Character. The player can use this mini-map as a radar to help find Cucumber Beetles in the sandbox.
First, we need to turn the Scene
view 2D toggle off. This will put the Scene
view back into 3D mode.
Here are the steps for creating a mini-map in our game:
- Right-click on an empty area of the
Hierarchy
panel and selectCamera
- Rename the
camera
asCamera_Minimap
- Double-click the
Camera_Minimap
camera in theHierarchy
panel to focus on that object in theScene
view - Change the
Transform
|Rotation
|X
value to90
, so it is looking at the ground - In the
Scene
view, use the transform tools to position the camera so that it covers your sandbox - You can use the
Camera Preview
to help determine what...