# maxInteractionDistance

> The maximal distance considered when casting world-space rays to determine the target of pointer events.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public float maxInteractionDistance { get; set; }
```

### Remarks

The default Raycasting Distance is [Mathf.Infinity](/engine/6000.7/script-reference/unityengine/mathf/infinity.md).

If World Space input is disabled, this property has no effect.
