Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsWithin3

    Extension methods to see if points are within a given distance of each other along all three axes. These methods are inclusive of the distance to check. Any Vector2 values will be expanded via the Expand(Vector2) method.

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

    Methods

    Within3(Component, Component, Single)

    If this is within a distance to another position.

    Declaration
    public static bool Within3(this Component self, Component other, float distance)
    Parameters
    Type Name Description
    Component self

    This position.

    Component other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Component, GameObject, Single)

    If this is within a distance to another position.

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

    This position.

    GameObject other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Component, Transform, Single)

    If this is within a distance to another position.

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

    This position.

    Transform other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Component, Vector2, Single)

    If this is within a distance to another position.

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

    This position.

    Vector2 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Component, Vector3, Single)

    If this is within a distance to another position.

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

    This position.

    Vector3 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(GameObject, Component, Single)

    If this is within a distance to another position.

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

    This position.

    Component other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(GameObject, GameObject, Single)

    If this is within a distance to another position.

    Declaration
    public static bool Within3(this GameObject self, GameObject other, float distance)
    Parameters
    Type Name Description
    GameObject self

    This position.

    GameObject other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(GameObject, Transform, Single)

    If this is within a distance to another position.

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

    This position.

    Transform other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(GameObject, Vector2, Single)

    If this is within a distance to another position.

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

    This position.

    Vector2 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(GameObject, Vector3, Single)

    If this is within a distance to another position.

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

    This position.

    Vector3 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Transform, Component, Single)

    If this is within a distance to another position.

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

    This position.

    Component other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Transform, GameObject, Single)

    If this is within a distance to another position.

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

    This position.

    GameObject other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Transform, Transform, Single)

    If this is within a distance to another position.

    Declaration
    public static bool Within3(this Transform self, Transform other, float distance)
    Parameters
    Type Name Description
    Transform self

    This position.

    Transform other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Transform, Vector2, Single)

    If this is within a distance to another position.

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

    This position.

    Vector2 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Transform, Vector3, Single)

    If this is within a distance to another position.

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

    This position.

    Vector3 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector2, Component, Single)

    If this is within a distance to another position.

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

    This position.

    Component other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector2, GameObject, Single)

    If this is within a distance to another position.

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

    This position.

    GameObject other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector2, Transform, Single)

    If this is within a distance to another position.

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

    This position.

    Transform other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector2, Vector3, Single)

    If this is within a distance to another position.

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

    This position.

    Vector3 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector3, Component, Single)

    If this is within a distance to another position.

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

    This position.

    Component other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector3, GameObject, Single)

    If this is within a distance to another position.

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

    This position.

    GameObject other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector3, Transform, Single)

    If this is within a distance to another position.

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

    This position.

    Transform other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector3, Vector2, Single)

    If this is within a distance to another position.

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

    This position.

    Vector2 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

    Within3(Vector3, Vector3, Single)

    If this is within a distance to another position.

    Declaration
    public static bool Within3(this Vector3 self, Vector3 other, float distance)
    Parameters
    Type Name Description
    Vector3 self

    This position.

    Vector3 other

    The other position.

    System.Single distance

    The distance.

    Returns
    Type Description
    System.Boolean

    If this is within a distance to another position.

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