Description
The FovAxis
property of the CameraComponent
class specifies the axis to use for the field of view (FOV) calculations. This property is particularly relevant when the camera is not set to orthographic projection, as indicated by the HideIf
attribute which hides this property if the Orthographic
property is true.
Usage
To set the FovAxis
property, you can assign it a value from the CameraComponent.Axis
enumeration. This will determine whether the FOV is calculated based on the horizontal or vertical axis.
Example
// Example of setting the FovAxis property
CameraComponent camera = new CameraComponent();
camera.FovAxis = CameraComponent.Axis.Horizontal; // Set FOV to be calculated based on the horizontal axis
// Check the current FovAxis
CameraComponent.Axis currentAxis = camera.FovAxis;
if (currentAxis == CameraComponent.Axis.Vertical)
{
// Perform actions based on vertical FOV
}