UnityEngine.Physics2D.OverlapCapsule C# (CSharp) Method

OverlapCapsule() public static method

Check if a collider falls within a capsule area.

public static OverlapCapsule ( Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D
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.
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 Collider2D
        public static Collider2D OverlapCapsule(Vector2 point, Vector2 size, CapsuleDirection2D direction, float angle, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
        {
            return INTERNAL_CALL_OverlapCapsule(ref point, ref size, direction, angle, layerMask, minDepth, maxDepth);
        }

Same methods

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