Struct LensSettings
Describes the FOV and clip planes for a camera. This generally mirrors the Unity Camera's lens settings, and will be used to drive the Unity camera when the vcam is active.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: solution.dll
Syntax
[Serializable]
public struct LensSettings
Fields
Name | Description |
---|---|
Dutch | The dutch (tilt) to be applied to the camera. In degrees |
FarClipPlane | The far clip plane for this LensSettings |
FieldOfView | This is the camera vertical field of view in degrees. Display will be in vertical degress, unless the
associated camera has its FOV axis setting set to Horizontal, in which case display will
be in horizontal degress. Internally, it is always vertical degrees. |
ModeOverride | Allows you to select a different camera mode to apply to the Camera component when Cinemachine activates this Virtual Camera. The changes applied to the Camera component through this setting will remain after the Virtual Camera deactivation. |
NearClipPlane | The near clip plane for this LensSettings |
OrthographicSize | When using an orthographic camera, this defines the half-height, in world co-ordinates, of the camera view. |
PhysicalProperties | The physical settings of the lens, valid only when camera is set to Physical mode. |
Properties
Name | Description |
---|---|
Aspect | For physical cameras, this is the Sensor aspect. |
Default | Default Lens Settings |
IsPhysicalCamera | This property will be true if the camera mode is set, either directly or indirectly, to Physical Camera Do not set this property. Instead, use the ModeOverride field to set physical mode. |
Orthographic | This is set every frame by the virtual camera, based on the value found in the currently associated Unity camera. Do not set this property. Instead, use the ModeOverride field to set orthographic mode. |
Methods
Name | Description |
---|---|
AreEqual(ref LensSettings, ref LensSettings) | Compare two lens settings objects for approximate equality |
CopyCameraMode(ref LensSettings) | Copy the properties controlled by camera mode. If ModeOverride is None, then some internal state information must be transferred. |
FromCamera(Camera) | Creates a new LensSettings, copying the values from the supplied Camera |
Lerp(LensSettings, LensSettings, float) | Linearly blends the fields of two LensSettings and returns the result |
Lerp(in LensSettings, float) | Lerp the interpolatable values. Values that can't be interpolated remain intact. |
PullInheritedPropertiesFromCamera(Camera) | In the event that there is no camera mode override, camera mode is driven by the Camera's state. |
Validate() | Make sure lens settings are sane. Call this from OnValidate(). |