public struct CameraLensWhat a shot asks the lens to be, and the part of a camera that can be blended.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Not a Camera, though it carries most of the same numbers. A Camera also says which order it renders in and what aspect ratio it wants, and neither of those is a property of a shot — two shots blending into each other cannot each have an opinion about render order. What is left is the optics, plus the one thing a camera component has no reason to carry: Dutch.
⚠ The live shot's lens is copied onto the camera entity every frame. A field of view typed into the Camera component of an entity that a CameraDirector is driving will be overwritten before it is ever used — which is the same bargain Cinemachine strikes, and the reason the lens is authored on the shot instead. WriteLens turns the copy off for a game that wants to own its field of view.
Fields and properties (7)
public float FieldOfViewVertical field of view, in radians. Ignored when Orthographic.
public float NearPlaneDistance to the near plane.
public float FarPlaneDistance to the far plane.
public bool OrthographicWhether the projection is orthographic.
public float OrthographicHeightThe height the orthographic view covers, in world units.
public float DutchRoll about the view axis, in radians — the tilted horizon a cinematographer calls a Dutch angle.
public static CameraLens DefaultA sensible perspective lens: 60° vertical, from 0.1 to 1000, no roll.
Methods (3)
public static CameraLens From(in Camera camera)The lens an existing camera is using.
public readonly void ApplyTo(ref Camera camera)Copies the optics onto a camera, leaving its aspect ratio and order alone.
public static CameraLens Blend(in CameraLens from, in CameraLens to, float amount)Mixes two lenses.
Used by (14)
- CameraDirectorSystemVixen.Engine
- CameraDirectorTestsVixen.Engine.Tests
- CameraFramingVixen.Engine
- CameraShotVixen.Engine
- CameraViewVixen.Animation
- DirectorStateVixen.Engine
- PlacementTestsVixen.Animation.Tests
- ScreenFrameVixen.Animation
- TypeRegistrationVixen.Engine
- VirtualCameraVixen.Engine
- VirtualCameraSystemVixen.Engine
- VirtualCameraTestsVixen.Engine.Tests
- Vixen_Engine_Cameras_CameraLensSerializerVixen.Engine
- Vixen_Engine_Cameras_VirtualCameraSerializerVixen.Engine