Spline Dolly
This CinemachineCamera Position Control behavior restricts the CinemachineCamera to move along a predefined spline. Use the Camera Position property to specify where to put the Camera on the spline.
Enable Automatic Dolly to move the camera to a position on the spline in an automated fashion: either at a fixed speed, or towards a point on the spline that is closest to the Tracking Target, or in some custom way that you devise.
Tip: Choose your spline shapes with care when using Nearest Point to Target Automatic Dolly. It can become problematic on splines that form an arc around some point. As an extreme illustration, consider a perfectly circular spline with the Tracking Target at the center. The closest point on the spline is unstable because all points on the circular spline are equally close to the target. In this situation, moving the Tracking Target small distances can cause the camera to move large distances on the spline.
Properties:
Property: | Function: | |
---|---|---|
Spline | The spline that the camera moves along. | |
Camera Position | The position along the spline at which to place the camera. Animate this property directly or enable Automatic Dolly. The value is in the units specified by Position Units. | |
Position Units | The unit of measure for Path Position. | |
Knot | The value is the knot index. The value 0 represents the first knot on the spline, 1 is the second knot, and so on. Non-integer values represent points in between the knots | |
Distance | Distance along the spline, in normal distance units. 0 is the beginning of the spline. | |
Normalized | The value 0 represents the beginning of the spline, 1 is the end of the spline. | |
Spline Offset | The position of the camera relative to the point on the spline. X is perpendicular to the spline, Y is up, and Z is parallel to the spline. Use this property to offset the camera from the spline itself. | |
Camera Rotation | How to set the camera's rotation and Up. This will affect the screen composition, because the camera Aim behaviours will always try to respect the Up direction. | |
Default | Do not modify the rotation or up direction of the camera. Instead, use the World Up Override property in Cinemachine Brain. | |
Path | Use the spline’s up vector and tangent at the current point. | |
Path No Roll | Use the spline’s up vector and tangent at the current point, but with the roll set to zero. | |
Follow Target | Use the up vector and rotation from the Tracking target’s transform. | |
Follow Target No Roll | Use the up vector and rotation from the Tracking target’s transform, but with the roll zeroed out. | |
Automatic Dolly | Controls whether automatic motion along the spline occurs. | |
Method | Controls how automatic dollying occurs. You can implement your own extensions to this by writing a custom SplineAutoDolly.ISplineAutoDolly class. | |
None | No automatic dollying occurs. You must control the CinemachineCamera's position on the spline by setting PathPosition. | |
Fixed Speed | Camera travels along the path at a fixed speed, which you can set. | |
Nearest Point To Target | Positions the camera at the point on the spline that is closest to the Tracking Target's position. A Tracking Target is required in the CinemachineCamera. You can also specify an offset from the closest point, to tune the camera's position. | |
Damping | Controls how aggressively the camera moves to its desired point on the spline. Smaller values produce a faster-moving camera, larger values produce a heavier, more slowly-moving camera. | |
Position | How aggressively the camera tries to maintain the offset along the x, y, or z directions in spline local space. X represents the axis that is perpendicular to the spline. Use this to smooth out imperfections in the path. This may move the camera off the spline. Y represents the axis that is defined by the spline-local up direction. Use this to smooth out imperfections in the path. This may move the camera off the spline. Z represents the axis that is parallel to the spline. This won't move the camera off the spline. | |
Angular Damping | How aggressively the camera tries to maintain the desired rotation. This is only used if Camera Rotation is not Default. |