As Iron Realms is an RPG we felt it important to include mechanics that liken our game to an RPG. One such mechanic is the use of a Mini-Map.
The way I chose to make the Mini-Map was rather simple. I made a secondary camera within the scene and placed it directly above the player. Within the script which accompanied this new camera I simply made a public Transform target, which would be set as the player game model. Then the line of code I made within the LateUpdate function would move the camera: transform.position. And move the camera to the x, y, z coordinates of the target, which was the player. As this was in the Update function the Mini-Map would constantly follow the player as they moved, providing a real time Mini-Map.
No comments:
Post a Comment