docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SplineUtility

    Utility functions for Spline.

    Inheritance
    object
    SplineUtility
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.U2D
    Assembly: Unity.2D.SpriteShape.Runtime.dll
    Syntax
    public class SplineUtility

    Methods

    CalculateTangents(Vector3, Vector3, Vector3, Vector3, float, 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.

    float 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
    float

    Angle

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