docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetSplinePosition

    GetSplinePosition(MonoBehaviour, Transform, SplineContainer, float, PathIndexUnit, float)

    Compute the desired position on the spline.

    Declaration
    float GetSplinePosition(MonoBehaviour sender, Transform target, SplineContainer spline, float currentPosition, PathIndexUnit positionUnits, float deltaTime)
    Parameters
    Type Name Description
    MonoBehaviour sender

    The MonoBehaviour that is asking.

    Transform target

    The target object (may be null for algorithms that don't require it).

    SplineContainer spline

    The spline on which the location must be found.

    float currentPosition

    The current position on the spline.

    PathIndexUnit positionUnits

    The units in which spline positions are expressed.

    float deltaTime

    Current deltaTime. If smaller than 0, then previous frame data should be ignored.

    Returns
    Type Description
    float

    The desired position on the spline, expressed in positionUnits.

    In This Article
    Back to top
    Copyright © 2023 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)