# Proximity

Proximity is the nearness in space between objects. The **Proximity** condition checks if (at least) two objects are near one from each other.

{% embed url="<https://youtu.be/-bk5S2L6FxI?si=ii76Bm8bIlnrozXR>" %}

The condition includes the following parameters:

* **Mode:** if you select `ENTER`, it means objects have to be **close from one another** at least at the specified distance (or below).\
  If you select `EXIT`, it means objects need to be far from each other, at a distance above than the distance set.
* **Max distance:** distance, in meters, between objects for the condition to be valid. Objects should be either at this distance or below to validate the`ENTER` or be above to validate `EXIT`.

*Note that the condition uses the Proximity colliders of the given IOs , the distance is calculated from the center of each collider but you can choose to calculate from the edges.*

* **Objects in proximity:** objects ([IO](/adding-interactivity/interactive-objects.md)) that need to be in proximity (at least two). You can add more than two objects, then if `Require All` is checked, all the specified objects in this list are required to validate the condition. If `Require All` is not checked, only one combination required for validating the condition.

**Minimum duration required:** check details [here](/adding-interactivity/interactions/conditions/duration-parameter.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://unity.zoeimmersive.com/adding-interactivity/interactions/conditions/proximity.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
