UnityEngine.Physics2D.OverlapPoint C# (CSharp) Method

OverlapPoint() public static method

Check if a collider overlaps a point in space.

public static OverlapPoint ( Vector2 point, [ layerMask, [ minDepth, [ maxDepth ) : Collider2D
point Vector2 A point in world space.
layerMask [ Filter to check objects only on specific layers.
minDepth [ Only include objects with a Z coordinate (depth) greater than or equal to this value.
maxDepth [ Only include objects with a Z coordinate (depth) less than or equal to this value.
return Collider2D
        public static Collider2D OverlapPoint(Vector2 point, [DefaultValue("DefaultRaycastLayers")] int layerMask, [DefaultValue("-Mathf.Infinity")] float minDepth, [DefaultValue("Mathf.Infinity")] float maxDepth)
        {
            return INTERNAL_CALL_OverlapPoint(ref point, layerMask, minDepth, maxDepth);
        }

Same methods

Physics2D::OverlapPoint ( Vector2 point ) : Collider2D
Physics2D::OverlapPoint ( Vector2 point, int layerMask ) : Collider2D
Physics2D::OverlapPoint ( Vector2 point, int layerMask, float minDepth ) : Collider2D
Physics2D