Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsDistance

    Extension methods to get the 2D distance across the X and Z axes. All three-dimensional vectors will be flattened via methods in KaijuAgentsFlatten.

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

    Methods

    Distance(Component, Component)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Component self, Component other)
    Parameters
    Type Name Description
    Component self

    This object.

    Component other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Component, GameObject)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Component self, GameObject other)
    Parameters
    Type Name Description
    Component self

    This object.

    GameObject other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Component, Transform)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Component self, Transform other)
    Parameters
    Type Name Description
    Component self

    This object.

    Transform other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Component, Vector2)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Component self, Vector2 other)
    Parameters
    Type Name Description
    Component self

    This object.

    Vector2 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Component, Vector3)

    Get the distance between this and another position.

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

    This object.

    Vector3 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(GameObject, Component)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this GameObject self, Component other)
    Parameters
    Type Name Description
    GameObject self

    This object.

    Component other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(GameObject, GameObject)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this GameObject self, GameObject other)
    Parameters
    Type Name Description
    GameObject self

    This object.

    GameObject other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(GameObject, Transform)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this GameObject self, Transform other)
    Parameters
    Type Name Description
    GameObject self

    This object.

    Transform other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(GameObject, Vector2)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this GameObject self, Vector2 other)
    Parameters
    Type Name Description
    GameObject self

    This object.

    Vector2 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(GameObject, Vector3)

    Get the distance between this and another position.

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

    This object.

    Vector3 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Transform, Component)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Transform self, Component other)
    Parameters
    Type Name Description
    Transform self

    This object.

    Component other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Transform, GameObject)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Transform self, GameObject other)
    Parameters
    Type Name Description
    Transform self

    This object.

    GameObject other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Transform, Transform)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Transform self, Transform other)
    Parameters
    Type Name Description
    Transform self

    This object.

    Transform other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Transform, Vector2)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Transform self, Vector2 other)
    Parameters
    Type Name Description
    Transform self

    This object.

    Vector2 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Transform, Vector3)

    Get the distance between this and another position.

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

    This object.

    Vector3 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector2, Component)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Vector2 self, Component other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    Component other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector2, GameObject)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Vector2 self, GameObject other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    GameObject other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector2, Transform)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Vector2 self, Transform other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    Transform other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector2, Vector2)

    Get the distance between this and another position.

    Declaration
    public static float Distance(this Vector2 self, Vector2 other)
    Parameters
    Type Name Description
    Vector2 self

    This position.

    Vector2 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector2, Vector3)

    Get the distance between this and another position.

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

    This position.

    Vector3 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector3, Component)

    Get the distance between this and another position.

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

    This position.

    Component other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector3, GameObject)

    Get the distance between this and another position.

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

    This position.

    GameObject other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector3, Transform)

    Get the distance between this and another position.

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

    This position.

    Transform other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector3, Vector2)

    Get the distance between this and another position.

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

    This position.

    Vector2 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

    Distance(Vector3, Vector3)

    Get the distance between this and another position.

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

    This position.

    Vector3 other

    The other position.

    Returns
    Type Description
    System.Single

    The distance.

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