Hiding player character image at center of minimap and showing triangle marker

With most minimaps, the center of the minimap is the location of the player's character, so we don't need to show the player's character in the minimap. Let's create a Layer named Player and place character-MsLazer onto that Layer. We can then improve efficiency and reduce visual clutter by creating a Culling Mask that ignores the Player Layer. We can display a simple 2D Sprite in the center of our minimap, pointing upwards, to indicate that our player is always facing upwards relative to what is displayed in the minimap:

  1. Create a new User Layer named Player.
  1. Select the character-MsLaser GameObject (the player's character) in the Hierarchy, and set the Layer ...

Get Unity 2018 Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.