Search Results for

    Show / Hide Table of Contents

    Class KaijuAgentsArcSphereCast

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

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

    Methods

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

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

    Declaration
    public static int ArcSphereCast(this Component position, Component direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Component position, GameObject direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Component position, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Component position, Transform direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Component position, Vector2 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Component position, Vector3 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this GameObject position, Component direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this GameObject position, GameObject direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this GameObject position, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this GameObject position, Transform direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this GameObject position, Vector2 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this GameObject position, Vector3 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Transform position, Component direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Transform position, GameObject direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Transform position, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Transform position, Transform direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Transform position, Vector2 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Transform position, Vector3 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector2 position, Component direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector2 position, GameObject direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector2 position, Transform direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector2 position, Vector2 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector2 position, Vector3 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector3 position, Component direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector3 position, GameObject direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector3 position, Transform direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector3 position, Vector2 direction, float radius, 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.Single radius

    The radius of the cast.

    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.

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

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

    Declaration
    public static int ArcSphereCast(this Vector3 position, Vector3 direction, float radius, 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.Single radius

    The radius of the cast.

    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.