CinemachinePath Class

Cinemachine

CinemachinePath Class

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.
Inheritance Hierarchy
SystemObject  Object
    Component
      Behaviour
        MonoBehaviour
          CinemachineCinemachinePathBase
            CinemachineCinemachinePath

Namespace:  Cinemachine
Assembly:  Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
[DocumentationSortingAttribute(18f, DocumentationSortingAttributeLevel.UserRef)]
[AddComponentMenu("Cinemachine/CinemachinePath")]
[SaveDuringPlayAttribute]
public class CinemachinePath : CinemachinePathBase
Cinemachine.CinemachinePath = function();

Type.createClass(
	'Cinemachine.CinemachinePath',
	Cinemachine.CinemachinePathBase);

The CinemachinePath type exposes the following members.

Constructors
  NameDescription
Public methodCinemachinePath
Top
Properties
  NameDescription
Public propertyDistanceCacheSampleStepsPerSegment
When calculating the distance cache, sample the path this many times between points
(Overrides CinemachinePathBaseDistanceCacheSampleStepsPerSegment.)
Public propertyLooped
True if the path ends are joined to form a continuous loop
(Overrides CinemachinePathBaseLooped.)
Public propertyMaxPos
The maximum value for the path position
(Overrides CinemachinePathBaseMaxPos.)
Public propertyMinPos
The minimum value for the path position
(Overrides CinemachinePathBaseMinPos.)
Public propertyPathLength
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
(Inherited from CinemachinePathBase.)
Top
Methods
  NameDescription
Public methodDistanceCacheIsValid
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
(Inherited from CinemachinePathBase.)
Public methodEvaluateOrientation
Get the orientation the curve at a point along the path.
(Overrides CinemachinePathBaseEvaluateOrientation(Single).)
Public methodEvaluateOrientationAtUnit
Get the orientation the curve at a point along the path.
(Inherited from CinemachinePathBase.)
Public methodEvaluatePosition
Get a worldspace position of a point along the path
(Overrides CinemachinePathBaseEvaluatePosition(Single).)
Public methodEvaluatePositionAtUnit
Get a worldspace position of a point along the path
(Inherited from CinemachinePathBase.)
Public methodEvaluateTangent
Get the tangent of the curve at a point along the path.
(Overrides CinemachinePathBaseEvaluateTangent(Single).)
Public methodEvaluateTangentAtUnit
Get the tangent of the curve at a point along the path.
(Inherited from CinemachinePathBase.)
Public methodFindClosestPoint
Find the closest point on the path to a given worldspace target point.
(Inherited from CinemachinePathBase.)
Public methodGetPathDistanceFromPosition
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
(Inherited from CinemachinePathBase.)
Public methodGetPathPositionFromDistance
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
(Inherited from CinemachinePathBase.)
Public methodInvalidateDistanceCache
Call this if the path changes in such a way as to affect distances or other cached path elements
(Inherited from CinemachinePathBase.)
Public methodMaxUnit
Get the maximum value, for the given unity type
(Inherited from CinemachinePathBase.)
Public methodMinUnit
Get the minimum value, for the given unity type
(Inherited from CinemachinePathBase.)
Public methodNormalizePathDistance
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
(Inherited from CinemachinePathBase.)
Public methodNormalizePos
Get a normalized path position, taking spins into account if looped
(Inherited from CinemachinePathBase.)
Public methodNormalizeUnit
Normalize the unit, so that it lies between MinUmit and MaxUnit
(Inherited from CinemachinePathBase.)
Top
Fields
  NameDescription
Public fieldm_Appearance
The settings that control how the path will appear in the editor scene view.
(Inherited from CinemachinePathBase.)
Public fieldm_Looped
If checked, then the path ends are joined to form a continuous loop
Public fieldm_Resolution
Path samples per waypoint
(Inherited from CinemachinePathBase.)
Public fieldm_Waypoints
The waypoints that define the path. They will be interpolated using a bezier curve
Top
See Also