# useOutsideDepth

> Sets the contact filter to filter within the _minDepth and _maxDepth range, or outside that range.

## Definition

* **Type:** Field
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public bool useOutsideDepth
```

### Remarks

[ContactFilter2D.useOutsideDepth](/engine/6000.7/script-reference/unityengine/contactfilter2d/useoutsidedepth.md) uses the range between [\_minDepth](/engine/6000.7/script-reference/unityengine/contactfilter2d/mindepth.md) and [\_maxDepth](/engine/6000.7/script-reference/unityengine/contactfilter2d/maxdepth.md) to filter depth. Set `useOutsideDepth` to true to only return object depth outside that range. Set `useOutsideDepth` to false to only return object depth within that range. It is false by default.

Additional Resources: [\_minDepth](/engine/6000.7/script-reference/unityengine/contactfilter2d/mindepth.md), [\_maxDepth](/engine/6000.7/script-reference/unityengine/contactfilter2d/maxdepth.md), [\_useDepth](/engine/6000.7/script-reference/unityengine/contactfilter2d/usedepth.md)
