To create a minimap, first set up the minimap camera, then set up the minimap on the vehicle.

Create Minimap Camera

To create a minimap camera:

  1. Create a new camera in the scene

  2. Set the Projection to Orthographic and adjust the Size so that it covers the full map

  3. Add a Minimap Camera component

Create Minimap

  1. Create a 2D radar

  2. Add a Minimap Controller to it

  3. Add the Tracker on your vehicle to the Tracker field

  4. Set the Player Vehicle transform

  5. Add a Raw Image somewhere on the vehicle (this will be the image that shows the minimap) and set it in the Map and Map Pivot fields of the Minimap Controller inspector

  6. Add a mask image over the raw image you created above and set it in the Map Mask field of the Minimap Controller inspector

That's it, the minimap will work when you play the scene.

If you are using the Mech Combat Kit and have any doubts about how to do something, refer to the Mech_Titan prefab and look under the HUD to find an example of how it's set up.

Last updated