# TestOverlapShape(PhysicsShape, QueryFilter)

> Tests if the provided shape overlaps any shapes. The selected shape is excluded from any results and must be in this world otherwise a warning will be produced.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public bool TestOverlapShape(PhysicsShape shape, PhysicsQuery.QueryFilter filter)
```

### Parameters

**** (\[PhysicsShape]\(/engine/6000.5/script-reference/unity/u2d/physics/physicsshape)): The shape used to check overlap.**** (\[QueryFilter]\(/engine/6000.5/script-reference/unity/u2d/physics/physicsquery/queryfilter)): The filter to control the result returned.

### Returns

| Type                                                          | Description                     |
| ------------------------------------------------------------- | ------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | If the query overlaps anything. |
