Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsAngle

    Extensions to get the angle in degrees from a position towards a target around the global Y axis. These will be from -180 to 180 degrees.

    Inheritance
    System.Object
    KaijuAgentsAngle
    Namespace: KaijuSolutions.Agents.Extensions
    Syntax
    public static class KaijuAgentsAngle

    Methods

    Angle(Component, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Component target)
    Parameters
    Type Name Description
    Component position

    The position with the direction being its forward.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Component, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Component forward, Component target)
    Parameters
    Type Name Description
    Component position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Component, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Component forward, GameObject target)
    Parameters
    Type Name Description
    Component position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Component, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Component forward, Transform target)
    Parameters
    Type Name Description
    Component position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Component, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Component forward, Vector2 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Component, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Component forward, Vector3 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, GameObject target)
    Parameters
    Type Name Description
    Component position

    The position with the direction being its forward.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, GameObject, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, GameObject forward, Component target)
    Parameters
    Type Name Description
    Component position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, GameObject, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, GameObject forward, GameObject target)
    Parameters
    Type Name Description
    Component position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, GameObject, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, GameObject forward, Transform target)
    Parameters
    Type Name Description
    Component position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, GameObject, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, GameObject forward, Vector2 target)
    Parameters
    Type Name Description
    Component position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, GameObject, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, GameObject forward, Vector3 target)
    Parameters
    Type Name Description
    Component position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Transform target)
    Parameters
    Type Name Description
    Component position

    The position with the direction being its forward.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Transform, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Transform forward, Component target)
    Parameters
    Type Name Description
    Component position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Transform, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Transform forward, GameObject target)
    Parameters
    Type Name Description
    Component position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Transform, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Transform forward, Transform target)
    Parameters
    Type Name Description
    Component position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Transform, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Transform forward, Vector2 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Transform, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Transform forward, Vector3 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector2 target)
    Parameters
    Type Name Description
    Component position

    The position with the direction being its forward.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector2, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector2 forward, Component target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector2, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector2 forward, GameObject target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector2, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector2 forward, Transform target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector2, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector2 forward, Vector2 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector2, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector2 forward, Vector3 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector3 target)
    Parameters
    Type Name Description
    Component position

    The position with the direction being its forward.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector3, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector3 forward, Component target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector3, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector3 forward, GameObject target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector3, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector3 forward, Transform target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector3, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector3 forward, Vector2 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Component, Vector3, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Component position, Vector3 forward, Vector3 target)
    Parameters
    Type Name Description
    Component position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Component target)
    Parameters
    Type Name Description
    GameObject position

    The position with the direction being its forward.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Component, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Component forward, Component target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Component, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Component forward, GameObject target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Component, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Component forward, Transform target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Component, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Component forward, Vector2 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Component, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Component forward, Vector3 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, GameObject target)
    Parameters
    Type Name Description
    GameObject position

    The position with the direction being its forward.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, GameObject, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, GameObject forward, Component target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, GameObject, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, GameObject forward, GameObject target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, GameObject, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, GameObject forward, Transform target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, GameObject, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, GameObject forward, Vector2 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, GameObject, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, GameObject forward, Vector3 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Transform target)
    Parameters
    Type Name Description
    GameObject position

    The position with the direction being its forward.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Transform, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Transform forward, Component target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Transform, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Transform forward, GameObject target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Transform, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Transform forward, Transform target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Transform, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Transform forward, Vector2 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Transform, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Transform forward, Vector3 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector2 target)
    Parameters
    Type Name Description
    GameObject position

    The position with the direction being its forward.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector2, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector2 forward, Component target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector2, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector2 forward, GameObject target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector2, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector2 forward, Transform target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector2, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector2 forward, Vector2 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector2, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector2 forward, Vector3 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector3 target)
    Parameters
    Type Name Description
    GameObject position

    The position with the direction being its forward.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector3, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector3 forward, Component target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector3, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector3 forward, GameObject target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector3, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector3 forward, Transform target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector3, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector3 forward, Vector2 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(GameObject, Vector3, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this GameObject position, Vector3 forward, Vector3 target)
    Parameters
    Type Name Description
    GameObject position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Component target)
    Parameters
    Type Name Description
    Transform position

    The position with the direction being its forward.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Component, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Component forward, Component target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Component, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Component forward, GameObject target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Component, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Component forward, Transform target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Component, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Component forward, Vector2 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Component, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Component forward, Vector3 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, GameObject target)
    Parameters
    Type Name Description
    Transform position

    The position with the direction being its forward.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, GameObject, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, GameObject forward, Component target)
    Parameters
    Type Name Description
    Transform position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, GameObject, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, GameObject forward, GameObject target)
    Parameters
    Type Name Description
    Transform position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, GameObject, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, GameObject forward, Transform target)
    Parameters
    Type Name Description
    Transform position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, GameObject, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, GameObject forward, Vector2 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, GameObject, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, GameObject forward, Vector3 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Transform target)
    Parameters
    Type Name Description
    Transform position

    The position with the direction being its forward.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Transform, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Transform forward, Component target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Transform, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Transform forward, GameObject target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Transform, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Transform forward, Transform target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Transform, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Transform forward, Vector2 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Transform, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Transform forward, Vector3 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector2 target)
    Parameters
    Type Name Description
    Transform position

    The position with the direction being its forward.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector2, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector2 forward, Component target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector2, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector2 forward, GameObject target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector2, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector2 forward, Transform target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector2, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector2 forward, Vector2 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector2, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector2 forward, Vector3 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector3 target)
    Parameters
    Type Name Description
    Transform position

    The position with the direction being its forward.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector3, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector3 forward, Component target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector3, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector3 forward, GameObject target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector3, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector3 forward, Transform target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector3, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector3 forward, Vector2 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Transform, Vector3, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Transform position, Vector3 forward, Vector3 target)
    Parameters
    Type Name Description
    Transform position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Component, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Component forward, Component target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Component, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Component forward, GameObject target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Component, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Component forward, Transform target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Component, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Component forward, Vector2 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Component, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Component forward, Vector3 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, GameObject, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, GameObject forward, Component target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, GameObject, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, GameObject forward, GameObject target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, GameObject, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, GameObject forward, Transform target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, GameObject, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, GameObject forward, Vector2 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, GameObject, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, GameObject forward, Vector3 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Transform, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Transform forward, Component target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Transform, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Transform forward, GameObject target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Transform, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Transform forward, Transform target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Transform, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Transform forward, Vector2 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Transform, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Transform forward, Vector3 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector2, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector2 forward, Component target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector2, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector2 forward, GameObject target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector2, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector2 forward, Transform target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector2, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector2 forward, Vector2 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector2, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector2 forward, Vector3 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector3, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector3 forward, Component target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector3, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector3 forward, GameObject target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector3, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector3 forward, Transform target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector3, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector3 forward, Vector2 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector2, Vector3, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector2 position, Vector3 forward, Vector3 target)
    Parameters
    Type Name Description
    Vector2 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Component, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Component forward, Component target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Component, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Component forward, GameObject target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Component, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Component forward, Transform target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Component, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Component forward, Vector2 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Component, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Component forward, Vector3 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Component forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, GameObject, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, GameObject forward, Component target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, GameObject, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, GameObject forward, GameObject target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, GameObject, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, GameObject forward, Transform target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, GameObject, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, GameObject forward, Vector2 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, GameObject, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, GameObject forward, Vector3 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    GameObject forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Transform, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Transform forward, Component target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Transform, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Transform forward, GameObject target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Transform, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Transform forward, Transform target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Transform, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Transform forward, Vector2 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Transform, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Transform forward, Vector3 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Transform forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector2, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector2 forward, Component target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector2, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector2 forward, GameObject target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector2, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector2 forward, Transform target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector2, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector2 forward, Vector2 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector2, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector2 forward, Vector3 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector2 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector3, Component)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector3 forward, Component target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Component target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector3, GameObject)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector3 forward, GameObject target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    GameObject target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector3, Transform)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector3 forward, Transform target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Transform target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector3, Vector2)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector3 forward, Vector2 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector2 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Angle(Vector3, Vector3, Vector3)

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    Declaration
    public static float Angle(this Vector3 position, Vector3 forward, Vector3 target)
    Parameters
    Type Name Description
    Vector3 position

    The position.

    Vector3 forward

    The forward direction to get the angle relative to.

    Vector3 target

    The target.

    Returns
    Type Description
    System.Single

    The angle in degrees from a position towards a target around the global Y axis. This will be from -180 to 180 degrees.

    In This Article
    Back to top MIT License © 2026 Kaiju Solutions Inc.