CinemachinePathBase Class
From Cinemachine
Cinemachine
![]() | CinemachinePathBase Class |
Abstract base class for a world-space path,
suitable for a camera dolly track.
SystemObject Object
Component
Behaviour
MonoBehaviour
CinemachineCinemachinePathBase
CinemachineCinemachinePath
CinemachineCinemachineSmoothPath
Component
Behaviour
MonoBehaviour
CinemachineCinemachinePathBase
CinemachineCinemachinePath
CinemachineCinemachineSmoothPath
Namespace: Cinemachine
Assembly: Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)
public abstract class CinemachinePathBase : MonoBehaviour
Cinemachine.CinemachinePathBase = function(); Type.createClass( 'Cinemachine.CinemachinePathBase', UnityEngine.MonoBehaviour);
The CinemachinePathBase type exposes the following members.
| Name | Description | |
|---|---|---|
| CinemachinePathBase |
| Name | Description | |
|---|---|---|
| DistanceCacheSampleStepsPerSegment | When calculating the distance cache, sample the path this many
times between points | |
| Looped | True if the path ends are joined to form a continuous loop | |
| MaxPos | The maximum value for the path position | |
| MinPos | The minimum value for the path position | |
| PathLength | Get the length of the path in distance units.
If the distance cache is not valid, then calling this will
trigger a potentially costly regeneration of the path distance cache |
| Name | Description | |
|---|---|---|
| DistanceCacheIsValid | See whether the distance cache is valid. If it's not valid,
then any call to GetPathLength() or GetPathPositionFromDistance() will
trigger a potentially costly regeneration of the path distance cache | |
| EvaluateOrientation | Get the orientation the curve at a point along the path. | |
| EvaluateOrientationAtUnit | Get the orientation the curve at a point along the path. | |
| EvaluatePosition | Get a worldspace position of a point along the path | |
| EvaluatePositionAtUnit | Get a worldspace position of a point along the path | |
| EvaluateTangent | Get the tangent of the curve at a point along the path. | |
| EvaluateTangentAtUnit | Get the tangent of the curve at a point along the path. | |
| FindClosestPoint | Find the closest point on the path to a given worldspace target point. | |
| GetPathDistanceFromPosition | Get the path position (in path units) corresponding to this distance along the path.
If the distance cache is not valid, then calling this will
trigger a potentially costly regeneration of the path distance cache | |
| GetPathPositionFromDistance | Get the path position (in path units) corresponding to this distance along the path.
If the distance cache is not valid, then calling this will
trigger a potentially costly regeneration of the path distance cache | |
| InvalidateDistanceCache | Call this if the path changes in such a way as to affect distances
or other cached path elements | |
| MaxUnit | Get the maximum value, for the given unity type | |
| MinUnit | Get the minimum value, for the given unity type | |
| NormalizePathDistance | Normalize a distance along the path based on the path length.
If the distance cache is not valid, then calling this will
trigger a potentially costly regeneration of the path distance cache | |
| NormalizePos | Get a normalized path position, taking spins into account if looped | |
| NormalizeUnit | Normalize the unit, so that it lies between MinUmit and MaxUnit |
| Name | Description | |
|---|---|---|
| m_Appearance | The settings that control how the path
will appear in the editor scene view. | |
| m_Resolution | Path samples per waypoint |
