Class CinemachineSplineDolly
A Cinemachine Camera Body component that constrains camera motion to a Spline. The camera can move along the spline.
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 Spline Position field. In Auto-Dolly mode, the Spline Position field is animated automatically every frame by finding the position on the spline that's closest to the camera's tracking target.
Inheritance
Inherited Members
Namespace: Unity.Cinemachine
Assembly: solution.dll
Syntax
[AddComponentMenu("Cinemachine/Procedural/Position Control/Cinemachine Spline Dolly")]
[DisallowMultipleComponent]
[CameraPipeline(CinemachineCore.Stage.Body)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.0/manual/CinemachineSplineDolly.html")]
public class CinemachineSplineDolly : CinemachineComponentBase
Fields
Name | Description |
---|---|
AutomaticDolly | Controls how automatic dolly occurs |
CameraPosition | The position along the spline at which the camera will be placed. This can be animated directly, or set automatically by the Auto-Dolly feature to get as close as possible to the Follow target. The value is interpreted according to the Position Units setting. |
CameraRotation | How to set the camera's rotation and Up. This will affect the screen composition. |
Damping | Settings for controlling damping, which causes the camera to move gradually towards the desired spline position |
PositionUnits | How to interpret the Spline Position: - Distance: Values range from 0 (start of Spline) to Length of the Spline (end of Spline). - Normalized: Values range from 0 (start of Spline) to 1 (end of Spline). - Knot: Values are defined by knot indices and a fractional value representing the normalized interpolation between the specific knot index and the next knot." |
Spline | The Spline container to which the camera will be constrained. |
SplineOffset | Where to put the camera relative to the spline position. X is perpendicular to the spline, Y is up, and Z is parallel to the spline. |
Properties
Name | Description |
---|---|
IsValid | True if component is enabled and has a spline |
Stage | Get the Cinemachine Pipeline stage that this component implements. Always returns the Body stage |
Methods
Name | Description |
---|---|
GetMaxDampTime() | Report maximum damping time needed for this component. |
MutateCameraState(ref CameraState, float) | Positions the virtual camera according to the transposer rules. |
OnEnable() | Called when the behaviour is enabled. |