How to zoom out orthographic camera so that the parts that aren't UI blocked remain the same.
I have a camera looking at an orthographic scene. I have two black bars that will cover the bottom and left portion of the screen as in the pic. I want the portion of the screen that's not covered with the bars to be the same as the scene before. How can I zoom out the camera accordingly. What's the math? I assume I have to convert the width from canvas space to world space and move the camera accordingly. But I am unsure as to how to calculate the zoom.
And is this possible to make resolution independent?
Answer by streeetwalker · Sep 22, 2020 at 11:36 AM
First, study the Camera.orthographicSize in the Unity Scripting documentation - this is how you control the "zoom" of an orthographic camera.
Your answer
Follow this Question
Related Questions
Using two cameras to blend regular 2D orthographic with 3D isometric orthographic elements 0 Answers
Camera zoom 0 Answers
Letterboxing issues 0 Answers
Screen cut off on iPhone 4 when using orthographic camera 1 Answer
The LWRP 6.9.1 PixelPerfectCamera breaks all my UI, normal PixelPerfectCamera works fine. Why? 0 Answers