- Home /
Adjusting FOV depending on device orientation?
I'm working on a project where users should be able to use the app in any orientation. However, when the orientation changes, the camera appears to zoom in because the FOV is staying the same but the screen height is changing.
I've tried using the following formula to keep the camera zoom the same, but this causes the FOV to change a lot on devices with different resolutions. var camera.fieldOfView = 2.0f Mathf.Atan(Screen.height 0.5f / distance) * Mathf.Rad2Deg;
Is there a way to change the frustum/FOV to make an object appear to be the same size across all mobile devices and resolutions/orientations?
Your answer
Follow this Question
Related Questions
object refer error 1 Answer
Camera movement in a 2D? (like angry birds) 1 Answer
Indicate with markers the direction of Gameobjects which are outside of the camerafield. 0 Answers
Find out if GameObject is in Field of View 2 Answers
Change camera FOV to keep 3d scene same size on screen, independently from resolution 0 Answers