docs.unity3d.com
    Show / Hide Table of Contents

    Class SplineUtility

    Utility functions for Spline.

    Inheritance
    Object
    SplineUtility
    Namespace: UnityEngine.U2D
    Syntax
    public class SplineUtility

    Methods

    CalculateTangents(Vector3, Vector3, Vector3, Vector3, Single, out Vector3, out Vector3)

    Calculate Left and Right Tangents for the given Control Point.

    Declaration
    public static void CalculateTangents(Vector3 point, Vector3 prevPoint, Vector3 nextPoint, Vector3 forward, float scale, out Vector3 rightTangent, out Vector3 leftTangent)
    Parameters
    Type Name Description
    Vector3 point

    Position of current point

    Vector3 prevPoint

    Position of previous point.

    Vector3 nextPoint

    Position of next point.

    Vector3 forward

    Forward vector.

    Single scale

    Scale.

    Vector3 rightTangent

    Right Tangent (out Value)

    Vector3 leftTangent

    Left Tangent (out Value)

    SlopeAngle(Vector2, Vector2)

    Calculate angle between direction vectors.

    Declaration
    public static float SlopeAngle(Vector2 start, Vector2 end)
    Parameters
    Type Name Description
    Vector2 start

    Start Vector

    Vector2 end

    End Vector

    Returns
    Type Description
    Single

    Angle

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023