docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Evaluate

    Evaluate<T>(T, float, out float3, out float3, out float3)

    Compute interpolated position, direction and upDirection at ratio t. Calling this method to get the 3 vectors is faster than calling independently EvaluatePosition, EvaluateDirection and EvaluateUpVector for the same time t as it reduces some redundant computation.

    Declaration
    public static bool Evaluate<T>(this T spline, float t, out float3 position, out float3 tangent, out float3 upVector) where T : ISpline
    Parameters
    Type Name Description
    T spline

    The spline to interpolate.

    float t

    A value between 0 and 1 representing the ratio along the curve.

    float3 position

    Output variable for the float3 position at t.

    float3 tangent

    Output variable for the float3 tangent at t.

    float3 upVector

    Output variable for the float3 up direction at t.

    Returns
    Type Description
    bool

    True if successful.

    Type Parameters
    Name Description
    T

    A type implementing ISpline.

    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)