Method GetVerticalFieldOfView
GetVerticalFieldOfView(Camera, float)
Calculates the vertical field of view from an aspect neutral (diagonal) field of view and the camera's aspect ratio.
Declaration
public static float GetVerticalFieldOfView(this Camera camera, float aspectNeutralFieldOfView)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The camera to get the aspect ratio from. |
float | aspectNeutralFieldOfView | The "aspect neutral" field of view, which is the diagonal field of view. |
Returns
Type | Description |
---|---|
float | The vertical field of view calculated. |
Remarks
The field of view property of a Unity Camera stores the vertical field of view.