docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CreateLinear

    CreateLinear(IList<float3>, bool)

    Create a Spline from a list of positions.

    Declaration
    public static Spline CreateLinear(IList<float3> positions, bool closed = false)
    Parameters
    Type Name Description
    IList<float3> positions

    A collection of knot positions.

    bool closed

    Whether the spline is open (has a start and end point) or closed (forms an unbroken loop).

    Returns
    Type Description
    Spline

    A new Spline.

    CreateLinear(IList<float3>, IList<quaternion>, bool)

    Create a Spline from a list of positions.

    Declaration
    public static Spline CreateLinear(IList<float3> positions, IList<quaternion> rotations, bool closed = false)
    Parameters
    Type Name Description
    IList<float3> positions

    A collection of knot positions.

    IList<quaternion> rotations

    A collection of knot rotations. Must be equal in length to the positions array.

    bool closed

    Whether the spline is open (has a start and end point) or closed (forms an unbroken loop).

    Returns
    Type Description
    Spline

    A new Spline.

    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)