Hi all,
i just want to know what is the command to change the fov axis from vertical to horizental.
Thank u
Hi all,
i just want to know what is the command to change the fov axis from vertical to horizental.
Thank u
You can’t, Unity FOV is always vertical. You need to convert your horizontal FOV to vertical and/or update the vertical FOV whenever the aspect ratio changes to ensure a constant horizontal FOV.
Since Unity 2019.1 there’s Camera.HorizontalToVerticalFieldOfView to convert the FOV.

How about this option?
Field of View Axis
(2021 LTS)
Not exposed in the API (it’s named m_FOVAxisMode) - 0 is Vertical


This setting only influences how the FOV is displayed in the editor. The fieldOfView property on the camera is still always the vertical FOV and with this setting, the editor only transparently converts between horizontal and vertical FOV while editing. If you want to change the FOV by script, you still need to set the vertical FOV and covert to/from horizontal FOV with the methods I mentioned above.