Search Unity

Display mini map hud.

Discussion in 'Scripting' started by Futurebear, Nov 2, 2011.

  1. Futurebear

    Futurebear

    Joined:
    Jan 11, 2010
    Posts:
    97
    So, I am going to use a second camera to draw a mini map. I need to know how to do two things. First is how do I make the camera render to only a part of the screen, and second is how do I change the shape of that render. Say if I wanted a hexagon to be the mini map, how do I make what the map camera is rendering to only show up in that hexagon? I have searched, but I don't think i am using the right keywords so either keywords to find what I am looking for, or some general help would be appreciated.

    Thanks
     
  2. justinlloyd

    justinlloyd

    Joined:
    Aug 5, 2010
    Posts:
    1,680
    You can attach a render texture to the camera and apply a shader, alpha or overlay to the render texture before drawing it on-screen. I am sure there are other ways too, but that's how I would approach it.