docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetCurveInterpolation

    GetCurveInterpolation(int, float)

    Return the normalized interpolation (t) corresponding to a distance on a BezierCurve.

    Declaration
    public float GetCurveInterpolation(int curveIndex, float curveDistance)
    Parameters
    Type Name Description
    int curveIndex

    The zero-based index of the curve.

    float curveDistance

    The curve-relative distance to convert to an interpolation ratio (also referred to as 't').

    Returns
    Type Description
    float

    The normalized interpolation ratio associated to distance on the designated curve.

    Implements
    ISpline.GetCurveInterpolation(int, float)
    Remarks

    It is inefficient to call this method frequently, as it will calculate the interpolation lookup table every time it is invoked. In cases where performance is critical, create a new Spline or NativeSpline instead. Note that you may pass a SplineSlice<T> to constructors for both Spline and NativeSpline.

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