Trying to build a game, and first I need to make a representative minimap. The only way I know of is to have a camera faced top down, but I want to be able to build one similar to other games where it isn’t displaying the actual game.
Add to that a fog of war effect, I’m assuming I have my camera, map graphic as a target and maybe another “fog” layer where I can change the opacity/alpha channel, but I want to be able to do it in a small radius as classic “fog of war” in many games.
All of this is possible by giving your top down camera a different culling mask than your main camera: Unity - Scripting API: Camera.cullingMask
You can even child big red and blue spheres or whatever you want to your GameObjects that are in a layer visible to the minimap camera only.
Here’s a tutorial:
Did you ever figure this out? I found there’s a way using a plane with a black material between the map camera and the world and make pixels transparent in a radius around the player, but I only know of Get/SetPixels and I’ve been warned away from these apparently-performance-heavy functions. Everywhere I go it’s just more people throwing these basic mini-map tutorials at me, which are the first things Google shows me.
I used this tutorial but then we ended up scrapping the fog of war effect