Class CinemachineSmoothPath | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class CinemachineSmoothPath

    Defines a world-space path, consisting of an array of waypoints, each of which has position and roll settings. Bezier interpolation is performed between the waypoints, to get a smooth and continuous path. The path will pass through all waypoints, and (unlike CinemachinePath) first and second order continuity is guaranteed

    Inheritance
    MonoBehaviour
    CinemachinePathBase
    CinemachineSmoothPath
    Inherited Members
    CinemachinePathBase.m_Resolution
    CinemachinePathBase.m_Appearance
    CinemachinePathBase.StandardizePos(Single)
    CinemachinePathBase.FindClosestPoint(Vector3, Int32, Int32, Int32)
    CinemachinePathBase.MinUnit(CinemachinePathBase.PositionUnits)
    CinemachinePathBase.MaxUnit(CinemachinePathBase.PositionUnits)
    CinemachinePathBase.StandardizeUnit(Single, CinemachinePathBase.PositionUnits)
    CinemachinePathBase.EvaluatePositionAtUnit(Single, CinemachinePathBase.PositionUnits)
    CinemachinePathBase.EvaluateTangentAtUnit(Single, CinemachinePathBase.PositionUnits)
    CinemachinePathBase.EvaluateOrientationAtUnit(Single, CinemachinePathBase.PositionUnits)
    CinemachinePathBase.DistanceCacheIsValid()
    CinemachinePathBase.PathLength
    CinemachinePathBase.StandardizePathDistance(Single)
    CinemachinePathBase.ToNativePathUnits(Single, CinemachinePathBase.PositionUnits)
    CinemachinePathBase.FromPathNativeUnits(Single, CinemachinePathBase.PositionUnits)
    Namespace: Cinemachine
    Syntax
    [DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
    public class CinemachineSmoothPath : CinemachinePathBase

    Fields

    m_Looped

    If checked, then the path ends are joined to form a continuous loop

    Declaration
    public bool m_Looped
    Field Value
    Type Description
    System.Boolean

    m_Waypoints

    The waypoints that define the path. They will be interpolated using a bezier curve

    Declaration
    public CinemachineSmoothPath.Waypoint[] m_Waypoints
    Field Value
    Type Description
    CinemachineSmoothPath.Waypoint[]

    Properties

    DistanceCacheSampleStepsPerSegment

    When calculating the distance cache, sample the path this many times between points

    Declaration
    public override int DistanceCacheSampleStepsPerSegment { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    CinemachinePathBase.DistanceCacheSampleStepsPerSegment

    Looped

    True if the path ends are joined to form a continuous loop

    Declaration
    public override bool Looped { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    CinemachinePathBase.Looped

    MaxPos

    The maximum value for the path position

    Declaration
    public override float MaxPos { get; }
    Property Value
    Type Description
    System.Single
    Overrides
    CinemachinePathBase.MaxPos

    MinPos

    The minimum value for the path position

    Declaration
    public override float MinPos { get; }
    Property Value
    Type Description
    System.Single
    Overrides
    CinemachinePathBase.MinPos

    Methods

    EvaluateOrientation(Single)

    Get the orientation the curve at a point along the path.

    Declaration
    public override Quaternion EvaluateOrientation(float pos)
    Parameters
    Type Name Description
    System.Single pos

    Postion along the path. Need not be normalized.

    Returns
    Type Description
    Quaternion

    World-space orientation of the path, as defined by tangent, up, and roll.

    Overrides
    CinemachinePathBase.EvaluateOrientation(Single)

    EvaluatePosition(Single)

    Get a worldspace position of a point along the path

    Declaration
    public override Vector3 EvaluatePosition(float pos)
    Parameters
    Type Name Description
    System.Single pos

    Postion along the path. Need not be normalized.

    Returns
    Type Description
    Vector3

    World-space position of the point along at path at pos

    Overrides
    CinemachinePathBase.EvaluatePosition(Single)

    EvaluateTangent(Single)

    Get the tangent of the curve at a point along the path.

    Declaration
    public override Vector3 EvaluateTangent(float pos)
    Parameters
    Type Name Description
    System.Single pos

    Postion along the path. Need not be normalized.

    Returns
    Type Description
    Vector3

    World-space direction of the path tangent. Length of the vector represents the tangent strength

    Overrides
    CinemachinePathBase.EvaluateTangent(Single)

    InvalidateDistanceCache()

    Call this if the path changes in such a way as to affect distances or other cached path elements

    Declaration
    public override void InvalidateDistanceCache()
    Overrides
    CinemachinePathBase.InvalidateDistanceCache()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023