Hey guys!
Does anybody know how to keep the camera view regardless of the device’s orientation? What I mean is when the device is on portrait, it looks a certain way. Then if it’s on landscape, the camera seems to zoom out. I want it to look exactly the same, but showing more because you have a wider view on landscape. But not zoom out the camera. Like, if you create an empty scene with a cube in front of the camera. See on the game view at a portrait aspect ratio of your phone, then see it on the game view at a landscape aspect ratio(just invert the numbers) you will notice that on landscape, it’s as if the camera zooms out. The cube seems to get smaller.
Answering my own question for future reference:
//if screen orientation is landscape, and reference is portrait
Camera.HorizontalToVerticalFieldOfView(initialFOV, Screen.width/Screen.height)
1 Like