Cinemachine Spline Cart
Cinemachine Spline Cart is a component that constrains the transform of its GameObject to a Spline . Use it to animate a GameObject along a path, or as a tracking target for CinemachineCamera.
Properties:
Property: | Function: | |
---|---|---|
Spline | The spline to follow. | |
Update Method | When to move the cart when speed is non-zero. Use Update or LateUpdate for normal updating and use Fixed Update for updates in sync with the Physics module. | |
Position Units | The unit of measure for Position. | |
Knot | Use knots along the spline. 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. | |
Speed | Move the cart with this speed. The value is interpreted according to Position Units. | |
Position | The position along the spline at which to place the cart. This can be animated directly or, if the speed is non-zero, will be updated automatically at a time specified by the Update Method. The value is interpreted according to Position Units. | |
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. |