Search Unity

Moving a Demond camera off the edge?

Discussion in '2D' started by Treasureman, Aug 19, 2014.

  1. Treasureman

    Treasureman

    Joined:
    Jul 5, 2014
    Posts:
    563
    I'm sorry if this doesn't fit in with 2D but I could find camera forums.

    I have a minimap in my game by putting a second camera overhead and putting it in the corner. I can't figure out how to get the camera off of the edge of the screen in play mode. I still want it in the corner but just not touching the edge. Is this possible?
     
  2. Punchbag

    Punchbag

    Joined:
    Oct 30, 2012
    Posts:
    48
    You should be able to adjust the ViewportRect to move the on-screen location's X and Y in from the edge. If this doesn't help, post a screenshot of the configuration or your code and I'll take a look.
     
  3. Treasureman

    Treasureman

    Joined:
    Jul 5, 2014
    Posts:
    563
    This might sound kind of stupid but don't know how to post a screenshot from my image files
     
  4. Punchbag

    Punchbag

    Joined:
    Oct 30, 2012
    Posts:
    48
    Put it onto a free service like drop box then use the image link or regular link to provide it to us.
     
  5. Vitor_r

    Vitor_r

    Joined:
    May 23, 2013
    Posts:
    93
    Or just use the "Upload a File" button
    Like i did :p
     

    Attached Files:

  6. Punchbag

    Punchbag

    Joined:
    Oct 30, 2012
    Posts:
    48
    This looks like a screenshot of the upload screen. Rather than the issue you're experiencing :)
     
  7. Vitor_r

    Vitor_r

    Joined:
    May 23, 2013
    Posts:
    93
    ahahha man... i posted the screenshot of the upload screen to instruct Treasureman how to do it :D
    I'm not the OP user.
     
  8. Punchbag

    Punchbag

    Joined:
    Oct 30, 2012
    Posts:
    48
    Haha, sorry, I'm at work and only skimmed the message XD
     
  9. Treasureman

    Treasureman

    Joined:
    Jul 5, 2014
    Posts:
    563
    ok,sorry here is my game Screenshot (26).png
    Here's where the minimap is

    Screenshot (27).png
    This is the camera script
    t Screenshot (28).png
    and heres where the camera is: Screenshot (29).png think you could help now?