> ## Documentation Index
> Fetch the complete documentation index at: https://docs.spline.design/llms.txt
> Use this file to discover all available pages before exploring further.

# Distance Event

The Distance Event allows you to trigger actions based on the distance between two objects.

<video src="https://cdn.spline.design/_assets/docs/11cd135b-84d2-497f-b0f5-279086308b0d.mp4" controls />

Here are the different properties of a Distance Event.

* **From** - Define object 1 for the distance check.
* **To** - Define object 2 for the distance check.
* **Distance** - The set value of distance between object 1 and 2 where the actions will be triggered.

If the distance between objects is less than the set value, the actions under ‘Then’ will be triggered.

And if it becomes more than the set value, the actions under ‘Else’ will be triggered.

<img src="https://cdn.spline.design/_assets/docs/725f5a37-54e1-4efc-a5ce-d07eb3cfaf6c.png" alt="image" style={{ maxWidth: "300px" }} />

***

<iframe src="https://my.spline.design/AUrtEhEYVTqPM5J5RpYGvihK/" title="Spline Embed" className="w-full h-96 rounded-xl" />

> *👆 Try it! Press the canvas to focus and use WASD to control the Sphere.*
