UnityEngine.Physics2D.OverlapCapsuleNonAlloc C# (CSharp) Method

OverlapCapsuleNonAlloc() public static method

Get a list of all colliders that fall within a capsule area.

public static OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results, [ layerMask, [ minDepth, [ maxDepth ) : int
point Vector2 Center of the capsule.
size Vector2 Size of the capsule.
direction CapsuleDirection2D The direction of the capsule.
angle float Angle of the capsule.
results Collider2D Array to receive results.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than this value.
return int
        public static int OverlapCapsuleNonAlloc(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D[] results, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
        {
            return INTERNAL_CALL_OverlapCapsuleNonAlloc(ref point, ref size, direction, angle, results, layerMask, minDepth, maxDepth);
        }

Same methods

Physics2D::OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results ) : int
Physics2D::OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results, int layerMask ) : int
Physics2D::OverlapCapsuleNonAlloc ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, Collider2D results, int layerMask, float minDepth ) : int
Physics2D