# Overlap

### Description

Picks [items](https://renownedgames.gitbook.io/ai-tree/environment-query-system/items) based on condition that they overlap with geometric body of given shape.

On top of common parameters that are listed above this test following parameters.

#### Parameters

| Name          | Description                               |
| ------------- | ----------------------------------------- |
| Shape         | Shape for checking overlap                |
| Up Offset     | Vertical offset of shape                  |
| Culling Layer | Layermask of "visible" for overlap layers |

#### Shapes

| Name   | Description                                            |
| ------ | ------------------------------------------------------ |
| Box    | Has shape of cuboid. You can specify it's half extents |
| Sphere | Has shape of sphere. You can specify it's radius       |

### Example

In the picture below overlap test is used to exclude [items](https://renownedgames.gitbook.io/ai-tree/environment-query-system/items) that are close to walls.

<figure><img src="https://2203000093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGOxTM7Aj9oiVaIINrEkE%2Fuploads%2F7VXKylTz8jQlxxthaQRf%2FEQ%20tests%20overlap.png?alt=media&#x26;token=beb304d6-c057-471f-a471-977b60b62840" alt=""><figcaption></figcaption></figure>

To achieve this effect set Test Purpose to "Filter Only". Set Filter Type to "Maximum" and then set Max Value to any non-negative value (in example Max Value is 0). Then set Shape to "Sphere" and specify it's parameters. In example Up Offset is 2, Radius is 1.5 and Culling Layer is "Everything".
