Property getDistanceOverride
getDistanceOverride
Overriding callback of this object's distance calculation.
Use this to change the calculation performed in GetDistance(Vector3) without needing to create a derived class.
When a callback is assigned to this property, the GetDistance(Vector3) execution calls it to perform the
distance calculation instead of using its default calculation (specified by distanceCalculationMode in this base class).
Assign null to this property to restore the default calculation.
Declaration
public Func<IXRInteractable, Vector3, DistanceInfo> getDistanceOverride { get; set; }
Property Value
| Type | Description |
|---|---|
| Func<IXRInteractable, Vector3, DistanceInfo> |
Remarks
The assigned callback will be invoked to calculate and return the distance information of the point on this Interactable (the first parameter) closest to the given location (the second parameter). The given location and returned distance information are in world space.