Namespace Cinemachine
Classes
AxisStatePropertyAttribute
Property applied to AxisState. Used for custom drawing in the inspector.
CinemachineBasicMultiChannelPerlin
As a part of the Cinemachine Pipeline implementing the Noise stage, this component adds Perlin Noise to the Camera state, in the Correction channel of the CameraState.
The noise is created by using a predefined noise profile asset. This defines the shape of the noise over time. You can scale this in amplitude or in time, to produce a large family of different noises using the same profile.
CinemachineBlend
Describes a blend between 2 Cinemachine Virtual Cameras, and holds the current state of the blend.
CinemachineBlendDefinitionPropertyAttribute
Property applied to CinemachineBlendDefinition. Used for custom drawing in the inspector.
CinemachineBlenderSettings
Asset that defines the rules for blending between Virtual Cameras.
CinemachineBlendListCamera
This is a virtual camera "manager" that owns and manages a collection
of child Virtual Cameras. When the camera goes live, these child vcams
are enabled, one after another, holding each camera for a designated time.
Blends between cameras are specified.
The last camera is held indefinitely.
CinemachineBrain
CinemachineBrain is the link between the Unity Camera and the Cinemachine Virtual Cameras in the scene. It monitors the priority stack to choose the current Virtual Camera, and blend with another if necessary. Finally and most importantly, it applies the Virtual Camera state to the attached Unity Camera.
The CinemachineBrain is also the place where rules for blending between virtual cameras are defined. Camera blending is an interpolation over time of one virtual camera position and state to another. If you think of virtual cameras as cameramen, then blending is a little like one cameraman smoothly passing the camera to another cameraman. You can specify the time over which to blend, as well as the blend curve shape. Note that a camera cut is just a zero-time blend.
CinemachineBrain.BrainEvent
Event with a CinemachineBrain parameter
CinemachineBrain.VcamEvent
Event with a ICinemachineCamera parameter
CinemachineClearShot
Cinemachine ClearShot is a "manager camera" that owns and manages a set of Virtual Camera gameObject children. When Live, the ClearShot will check the children, and choose the one with the best quality shot and make it Live.
This can be a very powerful tool. If the child cameras have CinemachineCollider extensions, they will analyze the scene for target obstructions, optimal target distance, and other items, and report their assessment of shot quality back to the ClearShot parent, who will then choose the best one. You can use this to set up complex multi-camera coverage of a scene, and be assured that a clear shot of the target will always be available.
If multiple child cameras have the same shot quality, the one with the highest priority will be chosen.
You can also define custom blends between the ClearShot children.
CinemachineCollider
An add-on module for Cinemachine Virtual Camera that post-processes the final position of the virtual camera. Based on the supplied settings, the Collider will attempt to preserve the line of sight with the LookAt target of the virtual camera by moving away from objects that will obstruct the view.
Additionally, the Collider can be used to assess the shot quality and report this as a field in the camera State.
CinemachineComponentBase
An abstract representation of a mutator acting on a Cinemachine Virtual Camera
CinemachineComposer
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera at the vcam's LookAt target object, with configurable offsets, damping, and composition rules.
The composer does not change the camera's position. It will only pan and tilt the camera where it is, in order to get the desired framing. To move the camera, you have to use the virtual camera's Body section.
CinemachineConfiner
An add-on module for Cinemachine Virtual Camera that post-processes the final position of the virtual camera. It will confine the virtual camera's position to the volume specified in the Bounding Volume field.
CinemachineCore
A singleton that manages complete lists of CinemachineBrain and, Cinemachine Virtual Cameras, and the priority queue. Provides services to keeping track of whether Cinemachine Virtual Cameras have been updated each frame.
CinemachineDollyCart
This is a very simple behaviour that constrains its transform to a CinemachinePath.
It can be used to animate any objects along a path, or as a Follow target for
Cinemachine Virtual Cameras.
CinemachineExtension
Base class for a Cinemachine Virtual Camera extension module. Hooks into the Cinemachine Pipeline.
CinemachineExternalCamera
This component will expose a non-cinemachine camera to the cinemachine system, allowing it to participate in blends. Just add it as a component alongside an existing Unity Camera component.
CinemachineFollowZoom
An add-on module for Cinemachine Virtual Camera that adjusts the FOV of the lens to keep the target object at a constant size on the screen, regardless of camera and target position.
CinemachineFramingTransposer
This is a Cinemachine Component in the Body section of the component pipeline. Its job is to position the camera in a fixed screen-space relationship to the vcam's Follow target object, with offsets and damping.
The camera will be first moved along the camera Z axis until the Follow target is at the desired distance from the camera's X-Y plane. The camera will then be moved in its XY plane until the Follow target is at the desired point on the camera's screen.
The FramingTansposer will only change the camera's position in space. It will not re-orient or otherwise aim the camera.
For this component to work properly, the vcam's LookAt target must be null. The Follow target will define what the camera is looking at.
If the Follow target is a CinemachineTargetGroup, then additional controls will be available to dynamically adjust the camera's view in order to frame the entire group.
Although this component was designed for orthographic cameras, it works equally
well with persective cameras and can be used in 3D environments.
CinemachineFreeLook
A Cinemachine Camera geared towards a 3rd person camera experience. The camera orbits around its subject with three separate camera rigs defining rings around the target. Each rig has its own radius, height offset, composer, and lens settings. Depending on the camera's position along the spline connecting these three rigs, these settings are interpolated to give the final camera position and state.
CinemachineGroupComposer
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera at a target object, with configurable offsets, damping, and composition rules.
In addition, if the target is a CinemachineTargetGroup, the behaviour will adjust the FOV and the camera distance to ensure that the entire group of targets is framed properly.
CinemachineHardLockToTarget
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to place the camera on the Follow Target.
CinemachineHardLookAt
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera hard at the LookAt target.
CinemachineMixingCamera
CinemachineMixingCamera is a "manager camera" that takes on the state of the weighted average of the states of its child virtual cameras.
A fixed number of slots are made available for cameras, rather than a dynamic array.
We do it this way in order to support weight animation from the Timeline.
Timeline cannot animate array elements.
CinemachineOrbitalTransposer
This is a CinemachineComponent in the the Body section of the component pipeline. Its job is to position the camera in a variable relationship to a the vcam's Follow target object, with offsets and damping.
This component is typically used to implement a camera that follows its target. It can accept player input from an input device, which allows the player to dynamically control the relationship between the camera and the target, for example with a joystick.
The OrbitalTransposer introduces the concept of Heading, which is the direction in which the target is moving, and the OrbitalTransposer will attempt to position the camera in relationship to the heading, which is by default directly behind the target. You can control the default relationship by adjusting the Heading Bias setting.
If you attach an input controller to the OrbitalTransposer, then the player can also control the way the camera positions itself in relation to the target heading. This allows the camera to move to any spot on an orbit around the target.
CinemachinePath
Defines a world-space path, consisting of an array of waypoints, each of which has position, tangent, and roll settings. Bezier interpolation is performed between the waypoints, to get a smooth and continuous path.
CinemachinePathBase
Abstract base class for a world-space path, suitable for a camera dolly track.
CinemachinePathBase.Appearance
This class holds the settings that control how the path will appear in the editor scene view. The path is not visible in the game view
CinemachinePipeline
Internal container for CinemachineComponentBase. Does nothing but contain.
CinemachinePOV
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera in response to the user's mouse or joystick input.
The composer does not change the camera's position. It will only pan and tilt the camera where it is, in order to get the desired framing. To move the camera, you have to use the virtual camera's Body section.
CinemachineSameAsFollowTarget
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to match the orientation of the Follow target.
CinemachineSmoothPath
Defines a world-space path, consisting of an array of waypoints, each of which has position and roll settings. Bezier interpolation is performed between the waypoints, to get a smooth and continuous path. The path will pass through all waypoints, and (unlike CinemachinePath) first and second order continuity is guaranteed
CinemachineStateDrivenCamera
This is a virtual camera "manager" that owns and manages a collection of child Virtual Cameras. These child vcams are mapped to individual states in an animation state machine, allowing you to associate specific vcams to specific animation states. When that state is active in the state machine, then the associated camera will be activated.
You can define custom blends and transitions between child cameras.
In order to use this behaviour, you must have an animated target (i.e. an object animated with a state machine) to drive the behaviour.
CinemachineStoryboard
An add-on module for Cinemachine Virtual Camera that places an image in screen space over the camera's output.
CinemachineTargetGroup
Defines a group of target objects, each with a radius and a weight. The weight is used when calculating the average position of the target group. Higher-weighted members of the group will count more. The bounding box is calculated by taking the member positions, weight, and radii into account.
CinemachineTrackedDolly
A Cinemachine Virtual Camera Body component that constrains camera motion to a CinemachinePath. The camera can move along the path.
This behaviour can operate in two modes: manual positioning, and Auto-Dolly positioning.
In Manual mode, the camera's position is specified by animating the Path Position field.
In Auto-Dolly mode, the Path Position field is animated automatically every frame by finding
the position on the path that's closest to the virtual camera's Follow target.
CinemachineTransposer
This is a CinemachineComponent in the Body section of the component pipeline. Its job is to position the camera in a fixed relationship to the vcam's Follow target object, with offsets and damping.
The Tansposer will only change the camera's position in space. It will not re-orient or otherwise aim the camera. To to that, you need to instruct the vcam in the Aim section of its pipeline.
CinemachineVirtualCamera
This behaviour is intended to be attached to an empty Transform GameObject, and it represents a Virtual Camera within the Unity scene.
The Virtual Camera will animate its Transform according to the rules contained in its CinemachineComponent pipeline (Aim, Body, and Noise). When the virtual camera is Live, the Unity camera will assume the position and orientation of the virtual camera.
A virtual camera is not a camera. Instead, it can be thought of as a camera controller, not unlike a cameraman. It can drive the Unity Camera and control its position, orientation, lens settings, and PostProcessing effects. Each Virtual Camera owns its own Cinemachine Component Pipeline, through which you provide the instructions for dynamically tracking specific game objects.
A virtual camera is very lightweight, and does no rendering of its own. It merely tracks interesting GameObjects, and positions itself accordingly. A typical game can have dozens of virtual cameras, each set up to follow a particular character or capture a particular event.
A Virtual Camera can be in any of three states:
- Live: The virtual camera is actively controlling the Unity Camera. The virtual camera is tracking its targets and being updated every frame.
- Standby: The virtual camera is tracking its targets and being updated every frame, but no Unity Camera is actively being controlled by it. This is the state of a virtual camera that is enabled in the scene but perhaps at a lower priority than the Live virtual camera.
- Disabled: The virtual camera is present but disabled in the scene. It is not actively tracking its targets and so consumes no processing power. However, the virtual camera can be made live from the Timeline.
The Unity Camera can be driven by any virtual camera in the scene. The game logic can choose the virtual camera to make live by manipulating the virtual cameras' enabled flags and their priorities, based on game logic.
In order to be driven by a virtual camera, the Unity Camera must have a CinemachineBrain behaviour, which will select the most eligible virtual camera based on its priority or on other criteria, and will manage blending.
CinemachineVirtualCameraBase
Base class for a Monobehaviour that represents a Virtual Camera within the Unity scene.
This is intended to be attached to an empty Transform GameObject. Inherited classes can be either standalone virtual cameras such as CinemachineVirtualCamera, or meta-cameras such as CinemachineClearShot or CinemachineFreeLook.
A CinemachineVirtualCameraBase exposes a Priority property. When the behaviour is enabled in the game, the Virtual Camera is automatically placed in a queue maintained by the static CinemachineCore singleton. The queue is sorted by priority. When a Unity camera is equipped with a CinemachineBrain behaviour, the brain will choose the camera at the head of the queue. If you have multiple Unity cameras with CinemachineBrain behaviours (say in a split-screen context), then you can filter the queue by setting the culling flags on the virtual cameras. The culling mask of the Unity Camera will then act as a filter for the brain. Apart from this, there is nothing that prevents a virtual camera from controlling multiple Unity cameras simultaneously.
DocumentationSortingAttribute
Atrtribute to control the automatic generation of documentation.
LensSettingsPropertyAttribute
Property applied to LensSettings. Used for custom drawing in the inspector.
NoiseSettings
This is an asset that defines a noise profile. A noise profile is the shape of the noise as a function of time. You can build arbitrarily complex shapes by combining different base perlin noise frequencies at different amplitudes.
The frequencies and amplitudes should be chosen with care, to ensure an interesting noise quality that is not obviously repetitive.
As a mathematical side-note, any arbitrary periodic curve can be broken down into a series of fixed-amplitude sine-waves added together. This is called fourier decomposition, and is the basis of much signal processing. It doesn't really have much to do with this asset, but it's super interesting!
NoiseSettingsPropertyAttribute
Property field is a NoiseSettings asset.
NoSaveDuringPlayAttribute
Suppresses play-mode-save for a field. Use it if the calsee has [SaveDuringPlay] attribute but there are fields in the class that shouldn't be saved.
OrbitalTransposerHeadingPropertyAttribute
Property applied to OrbitalTransposer.Heading. Used for custom drawing in the inspector.
RuntimeUtility
An ad-hoc collection of helpers, used by Cinemachine or its editor tools in various places
SaveDuringPlayAttribute
Invoke play-mode-save for a class. This class's fields will be scanned upon exiting play mode, and its property values will be applied to the scene object. This is a stopgap measure that will become obsolete once Unity implements play-mode-save in a more general way.
TagFieldAttribute
Property field is a Tag.
Structs
AxisState
Axis state for defining how to react to player input.
The settings here control the responsiveness of the axis to player input.
AxisState.Recentering
Helper for automatic axis recentering
CameraState
The output of the Cinemachine engine for a specific virtual camera. The information in this struct can be blended, and provides what is needed to calculate an appropriate camera position, orientation, and lens setting.
Raw values are what the Cinemachine behaviours generate. The correction channel holds perturbations to the raw values - e.g. noise or smoothing, or obstacle avoidance corrections. Coirrections are not considered when making time-based calculations such as damping.
The Final position and orientation is the comination of the raw values and their corrections.
CameraState.CustomBlendable
Opaque structure represent extra blendable stuff and its weight. The base system ignores this data - it is intended for extension modules
CinemachineBlendDefinition
Definition of a Camera blend. This struct holds the information necessary to generate a suitable AnimationCurve for a Cinemachine Blend.
CinemachineBlenderSettings.CustomBlend
Container specifying how two specific Cinemachine Virtual Cameras blend together.
CinemachineBlendListCamera.Instruction
This represents a single entry in the instrunction list of the BlendListCamera.
CinemachineFreeLook.Orbit
Defines the height and radius of the Rig orbit
CinemachineOrbitalTransposer.Heading
How the "forward" direction is defined. Orbital offset is in relation to the forward direction.
CinemachinePath.Waypoint
A waypoint along the path
CinemachineSmoothPath.Waypoint
A waypoint along the path
CinemachineStateDrivenCamera.Instruction
This represents a single instrunction to the StateDrivenCamera. It associates an state from the state machine with a child Virtual Camera, and also holds activation tuning parameters.
CinemachineStateDrivenCamera.ParentHash
Internal API for the Inspector editor. This implements nested states.
CinemachineTargetGroup.Target
Holds the information that represents a member of the group
CinemachineTrackedDolly.AutoDolly
Controls how automatic dollying occurs
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.
NoiseSettings.NoiseParams
Describes the behaviour for a channel of noise
NoiseSettings.TransformNoiseParams
Contains the behaviour of noise for the noise module for all 3 cardinal axes of the camera
Interfaces
ICinemachineCamera
An abstract representation of a virtual camera which lives within the Unity scene
Enums
CameraState.BlendHintValue
These hints can be or'ed toether to influence how blending is done, and how state is applied to the camera
CinemachineBlendDefinition.Style
Supported predefined shapes for the blend curve.
CinemachineBrain.UpdateMethod
This enum defines the options available for the update method.
CinemachineCollider.ResolutionStrategy
The way in which the Collider will attempt to preserve sight of the target.
CinemachineConfiner.Mode
The confiner can operate using a 2D bounding shape or a 3D bounding volume
CinemachineCore.Stage
Stages in the Cinemachine Component pipeline, used for UI organization>. This enum defines the pipeline order.
CinemachineCore.UpdateFilter
Internal use only
CinemachineDollyCart.UpdateMethod
This enum defines the options available for the update method.
CinemachineFramingTransposer.AdjustmentMode
How to adjust the camera to get the desired framing
CinemachineFramingTransposer.FramingMode
What screen dimensions to consider when framing
CinemachineGroupComposer.AdjustmentMode
How to adjust the camera to get the desired framing
CinemachineGroupComposer.FramingMode
What screen dimensions to consider when framing
CinemachineOrbitalTransposer.Heading.HeadingDefinition
Sets the algorithm for determining the target's heading for purposes of re-centering the camera
CinemachinePathBase.PositionUnits
How to interpret the Path Position
CinemachineStoryboard.FillStrategy
How to fit the image in the frame, in the event that the aspect ratios don't match
CinemachineTargetGroup.PositionMode
How the group's position is calculated
CinemachineTargetGroup.RotationMode
How the group's orientation is calculated
CinemachineTargetGroup.UpdateMethod
This enum defines the options available for the update method.
CinemachineTrackedDolly.CameraUpMode
Different ways to set the camera's up vector
CinemachineTransposer.BindingMode
The coordinate space to use when interpreting the offset from the target
CinemachineVirtualCameraBase.PositionBlendMethod
Hint for blending positions to and from this virtual camera
DocumentationSortingAttribute.Level
Refinement level of the documentation
Delegates
CinemachineCore.AxisInputDelegate
Delegate for overriding Unity's default input system. Returns the value of the named axis.
CinemachineFreeLook.CreateRigDelegate
Override component pipeline creation. This needs to be done by the editor to support Undo. The override must do exactly the same thing as the CreatePipeline method in this class.
CinemachineFreeLook.DestroyRigDelegate
Override component pipeline destruction. This needs to be done by the editor to support Undo.
CinemachineVirtualCamera.CreatePipelineDelegate
Override component pipeline creation. This needs to be done by the editor to support Undo. The override must do exactly the same thing as the CreatePipeline method in the CinemachineVirtualCamera class.
CinemachineVirtualCamera.DestroyPipelineDelegate
Override component pipeline destruction. This needs to be done by the editor to support Undo.