Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsArcRaycast

    Extension methods to perform ray casting along an arc. Any Vector2 values will be expanded via the Expand(Vector2) method.

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

    Methods

    ArcRaycast(Component, Component, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Component position, Component direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Component position

    The starting position of the cast.

    Component direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Component, GameObject, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Component position, GameObject direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Component position

    The starting position of the cast.

    GameObject direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Component, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Component position, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Component position

    The starting position of the cast which will be cast in its forward direction.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Component, Transform, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Component position, Transform direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Component position

    The starting position of the cast.

    Transform direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Component, Vector2, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Component position, Vector2 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Component position

    The starting position of the cast.

    Vector2 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Component, Vector3, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Component position, Vector3 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Component position

    The starting position of the cast.

    Vector3 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(GameObject, Component, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this GameObject position, Component direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    GameObject position

    The starting position of the cast.

    Component direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(GameObject, GameObject, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this GameObject position, GameObject direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    GameObject position

    The starting position of the cast.

    GameObject direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(GameObject, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this GameObject position, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    GameObject position

    The starting position of the cast which will be cast in its forward direction.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(GameObject, Transform, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this GameObject position, Transform direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    GameObject position

    The starting position of the cast.

    Transform direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(GameObject, Vector2, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this GameObject position, Vector2 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    GameObject position

    The starting position of the cast.

    Vector2 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(GameObject, Vector3, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this GameObject position, Vector3 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    GameObject position

    The starting position of the cast.

    Vector3 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Transform, Component, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Transform position, Component direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Transform position

    The starting position of the cast.

    Component direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Transform, GameObject, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Transform position, GameObject direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Transform position

    The starting position of the cast.

    GameObject direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Transform, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Transform position, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Transform position

    The starting position of the cast which will be cast in its forward direction.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Transform, Transform, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Transform position, Transform direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Transform position

    The starting position of the cast.

    Transform direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Transform, Vector2, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Transform position, Vector2 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Transform position

    The starting position of the cast.

    Vector2 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Transform, Vector3, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Transform position, Vector3 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Transform position

    The starting position of the cast.

    Vector3 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector2, Component, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector2 position, Component direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector2 position

    The starting position of the cast.

    Component direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector2, GameObject, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector2 position, GameObject direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector2 position

    The starting position of the cast.

    GameObject direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector2, Transform, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector2 position, Transform direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector2 position

    The starting position of the cast.

    Transform direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector2, Vector2, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector2 position, Vector2 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector2 position

    The starting position of the cast.

    Vector2 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector2, Vector3, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector2 position, Vector3 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector2 position

    The starting position of the cast.

    Vector3 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector3, Component, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector3 position, Component direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector3 position

    The starting position of the cast.

    Component direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector3, GameObject, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector3 position, GameObject direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector3 position

    The starting position of the cast.

    GameObject direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector3, Transform, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector3 position, Transform direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector3 position

    The starting position of the cast.

    Transform direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector3, Vector2, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector3 position, Vector2 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector3 position

    The starting position of the cast.

    Vector2 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

    ArcRaycast(Vector3, Vector3, Nullable<RaycastHit>[], Single, Single, Int32, QueryTriggerInteraction)

    Perform multiple raycasts given by the length of the hits array evenly spread across the angle given.

    Declaration
    public static int ArcRaycast(this Vector3 position, Vector3 direction, RaycastHit? [] hits, float angle = 360F, float distance = 3.40282347E+38F, int mask = -5, QueryTriggerInteraction triggers = null)
    Parameters
    Type Name Description
    Vector3 position

    The starting position of the cast.

    Vector3 direction

    The direction denoting the center of the arc of casts.

    System.Nullable<RaycastHit>[] hits

    The hits detected from the arc, stored from left to right.

    System.Single angle

    The angle of the arc in degrees.

    System.Single distance

    The distance for the casts.

    System.Int32 mask

    The optional layer mask.

    QueryTriggerInteraction triggers

    How the casts should handle hitting triggers.

    Returns
    Type Description
    System.Int32

    The number of rays which reported a hit, which will match the number of non-null entries in the hit array.

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