docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CalculateLength

    CalculateLength(BezierCurve, int)

    Calculate the length of a BezierCurve by unrolling the curve into linear segments and summing the lengths of the lines. This is equivalent to accessing GetCurveLength(int).

    Declaration
    public static float CalculateLength(BezierCurve curve, int resolution = 30)
    Parameters
    Type Name Description
    BezierCurve curve

    The BezierCurve to calculate length.

    int resolution

    The number of linear segments used to calculate the curve length.

    Returns
    Type Description
    float

    The sum length of a collection of linear segments fitting this curve.

    See Also
    ApproximateLength(BezierCurve)
    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)