Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

2d camera controller whole screen transition

Discussion in '2D' started by MorkLozer, Dec 23, 2020.

  1. MorkLozer

    MorkLozer

    Joined:
    Dec 13, 2020
    Posts:
    2
    every camera controller i find online to reference has the camera following the player. I want a camera that moves a whole screen when the player crosses the edge of the camera. so my question is are there any methods to get a reliable reference to use for transform.position and such? I just really want to be able to get the width of the screen in transform units. the only method to get the width of the screen ive come across gives the measurement in pixels which i find unhelpful.
     
  2. MorkLozer

    MorkLozer

    Joined:
    Dec 13, 2020
    Posts:
    2
    In case anyone comes across this and is also wondering i ended up sorting the issue out with camera.ScreenToWorldPoint and vice versa to convert pixel location to world location, not my favorite fix, but a fix.
     
  3. Lime86

    Lime86

    Joined:
    Nov 24, 2020
    Posts:
    1
    Hey @MorkLozer, I think you talking about switch between Screen Boxes like in this video:

    Watch in 2:00.