UI - Minimap

Originally I wanted no minimap but after consideration I decided to implement a very basic one that reacted to the lighting from the scene,giving the outline of the world as you move through it.

I started by creating a camera and positioning it above the player, aiming down from a birds-eye perspective. I then made it an orthographic camera to remove any perspective, and created a simple script to make it follow the player.











With the camera following the player, I now needed to render the camera as part of the UI. I used a render texture and placed it in the corner of the UI, making sure the texture selected was from the minimap camera.









In order for the player to be seen in the dark world, I created a sprite on a new 'minimap' layer, making sure that the only camera to see that layer was the minimap camera. The sprite is an arrow that locks to the player so it moves and rotates with the player. This is the finished product:










The minimap and compass combined are part of the overall User Experience (UX). They really help the game become user friendly. They are elements that are included in many different games and many genres, but not as often in horror.

Comments