Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsDirection3

    Extension methods to get the direction along all three axes from one position to another. Any Vector2 values will be expanded via the Expand(Vector2) method.

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

    Methods

    Direction3(Component, Component)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Component self, Component other)
    Parameters
    Type Name Description
    Component self

    This position.

    Component other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Component, GameObject)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Component self, GameObject other)
    Parameters
    Type Name Description
    Component self

    This position.

    GameObject other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Component, Transform)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Component self, Transform other)
    Parameters
    Type Name Description
    Component self

    This position.

    Transform other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Component, Vector2)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Component self, Vector2 other)
    Parameters
    Type Name Description
    Component self

    This position.

    Vector2 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Component, Vector3)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Component self, Vector3 other)
    Parameters
    Type Name Description
    Component self

    This position.

    Vector3 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(GameObject, Component)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this GameObject self, Component other)
    Parameters
    Type Name Description
    GameObject self

    This position.

    Component other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(GameObject, GameObject)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this GameObject self, GameObject other)
    Parameters
    Type Name Description
    GameObject self

    This position.

    GameObject other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(GameObject, Transform)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this GameObject self, Transform other)
    Parameters
    Type Name Description
    GameObject self

    This position.

    Transform other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(GameObject, Vector2)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this GameObject self, Vector2 other)
    Parameters
    Type Name Description
    GameObject self

    This position.

    Vector2 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(GameObject, Vector3)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this GameObject self, Vector3 other)
    Parameters
    Type Name Description
    GameObject self

    This position.

    Vector3 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Transform, Component)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Transform self, Component other)
    Parameters
    Type Name Description
    Transform self

    This position.

    Component other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Transform, GameObject)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Transform self, GameObject other)
    Parameters
    Type Name Description
    Transform self

    This position.

    GameObject other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Transform, Transform)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Transform self, Transform other)
    Parameters
    Type Name Description
    Transform self

    This position.

    Transform other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Transform, Vector2)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Transform self, Vector2 other)
    Parameters
    Type Name Description
    Transform self

    This position.

    Vector2 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Transform, Vector3)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Transform self, Vector3 other)
    Parameters
    Type Name Description
    Transform self

    This position.

    Vector3 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector2, Component)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector2 self, Component other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    Component other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector2, GameObject)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector2 self, GameObject other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    GameObject other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector2, Transform)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector2 self, Transform other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    Transform other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector2, Vector2)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector2 self, Vector2 other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    Vector2 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector2, Vector3)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector2 self, Vector3 other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    Vector3 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector3, Component)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector3 self, Component other)
    Parameters
    Type Name Description
    Vector3 self

    This position.

    Component other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector3, GameObject)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector3 self, GameObject other)
    Parameters
    Type Name Description
    Vector3 self

    This position.

    GameObject other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector3, Transform)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector3 self, Transform other)
    Parameters
    Type Name Description
    Vector3 self

    This position.

    Transform other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector3, Vector2)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector3 self, Vector2 other)
    Parameters
    Type Name Description
    Vector3 self

    This position.

    Vector2 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

    Direction3(Vector3, Vector3)

    The direction from this position to another position.

    Declaration
    public static Vector3 Direction3(this Vector3 self, Vector3 other)
    Parameters
    Type Name Description
    Vector3 self

    This position.

    Vector3 other

    The other position.

    Returns
    Type Description
    Vector3

    The direction from this position to another position.

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