CinemachinePathBase Class

Cinemachine

CinemachinePathBase Class

Abstract base class for a world-space path, suitable for a camera dolly track.
Inheritance Hierarchy
SystemObject  Object
    Component
      Behaviour
        MonoBehaviour
          CinemachineCinemachinePathBase
            CinemachineCinemachinePath
            CinemachineCinemachineSmoothPath

Namespace:  Cinemachine
Assembly:  Cinemachine (in Cinemachine.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
public abstract class CinemachinePathBase : MonoBehaviour
Cinemachine.CinemachinePathBase = function();

Type.createClass(
	'Cinemachine.CinemachinePathBase',
	UnityEngine.MonoBehaviour);

The CinemachinePathBase type exposes the following members.

Constructors
  NameDescription
Protected methodCinemachinePathBase
Top
Properties
  NameDescription
Public propertyDistanceCacheSampleStepsPerSegment
When calculating the distance cache, sample the path this many times between points
Public propertyLooped
True if the path ends are joined to form a continuous loop
Public propertyMaxPos
The maximum value for the path position
Public propertyMinPos
The minimum value for the path position
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
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
Public methodEvaluateOrientation
Get the orientation the curve at a point along the path.
Public methodEvaluateOrientationAtUnit
Get the orientation the curve at a point along the path.
Public methodEvaluatePosition
Get a worldspace position of a point along the path
Public methodEvaluatePositionAtUnit
Get a worldspace position of a point along the path
Public methodEvaluateTangent
Get the tangent of the curve at a point along the path.
Public methodEvaluateTangentAtUnit
Get the tangent of the curve at a point along the path.
Public methodFindClosestPoint
Find the closest point on the path to a given worldspace target point.
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
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
Public methodInvalidateDistanceCache
Call this if the path changes in such a way as to affect distances or other cached path elements
Public methodMaxUnit
Get the maximum value, for the given unity type
Public methodMinUnit
Get the minimum value, for the given unity type
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
Public methodNormalizePos
Get a normalized path position, taking spins into account if looped
Public methodNormalizeUnit
Normalize the unit, so that it lies between MinUmit and MaxUnit
Top
Fields
  NameDescription
Public fieldm_Appearance
The settings that control how the path will appear in the editor scene view.
Public fieldm_Resolution
Path samples per waypoint
Top
See Also