> For the complete documentation index, see [llms.txt](https://renownedgames.gitbook.io/ai-tree/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://renownedgames.gitbook.io/ai-tree/environment-query-system/useful-objects/environment-query/tests/distance.md).

# Distance

### Description

Picks [items](/ai-tree/environment-query-system/items.md) based on their distance from specified object.

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

#### Parameters

| Name        | Description                                                         |
| ----------- | ------------------------------------------------------------------- |
| Distance To | Distance to specified object (querier, item or specified key value) |

### Example

In the picture below distance test is used to filter all the [items](/ai-tree/environment-query-system/items.md) that are not further that 8 units from querier.

<figure><img src="/files/pfSoZRPMt3KgEGvXXieD" alt=""><figcaption></figcaption></figure>

To achieve this effect set Test Purpose to "Filter Only", Filter Type to "Maximum" and Distance To to "Querier". Then adjust filter value (in this example value is set to 8).

{% hint style="info" %}
For more information about querier visit [EQS Tester](/ai-tree/environment-query-system/useful-components/eqs-tester.md) tab.
{% endhint %}
