# 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:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

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

### Parameters

**** (\[PhysicsShape]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsshape)): The shape used to check overlap.**** (\[QueryFilter]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/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. |
