docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SplineSettings

    This structure holds the spline reference and the position and position units.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Cinemachine
    Assembly: Unity.Cinemachine.dll
    Syntax
    [Serializable]
    public struct SplineSettings

    Fields

    Position

    The position along the spline. The actual value corresponding to a given point on the spline will depend on the unity type.

    Declaration
    [Tooltip("The position along the spline.  The actual value corresponding to a given point on the spline will depend on the unity type.")]
    public float Position
    Field Value
    Type Description
    float

    Spline

    The Spline container to which the the position will apply.

    Declaration
    [Tooltip("The Spline container to which the position will apply.")]
    public SplineContainer Spline
    Field Value
    Type Description
    SplineContainer

    Units

    How to interpret the Spline Position: - Distance: Values range from 0 (start of Spline) to Length of the Spline (end of Spline). - Normalized: Values range from 0 (start of Spline) to 1 (end of Spline). - Knot: Values are defined by knot indices and a fractional value representing the normalized interpolation between the specific knot index and the next knot."

    Declaration
    [Tooltip("How to interpret the Spline Position:\n- <b>Distance</b>: Values range from 0 (start of Spline) to Length of the Spline (end of Spline).\n- <b>Normalized</b>: Values range from 0 (start of Spline) to 1 (end of Spline).\n- <b>Knot</b>: Values are defined by knot indices and a fractional value representing the normalized interpolation between the specific knot index and the next knot.\n")]
    public PathIndexUnit Units
    Field Value
    Type Description
    PathIndexUnit

    Methods

    ChangeUnitPreservePosition(PathIndexUnit)

    Change the units of the position, preserving the position on the spline.
    The value of Position may change in order to preserve the position on the spline.

    Declaration
    public void ChangeUnitPreservePosition(PathIndexUnit newUnits)
    Parameters
    Type Name Description
    PathIndexUnit newUnits

    The new units to use

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)