Method GetClosestPointOfAttachTransform
GetClosestPointOfAttachTransform(IXRInteractor)
Tries to get the closest point on the associated snapping collider based on the attach transform position of the associated interactable. If snapToCollider is null, it will return the attach transform position of the associated interactable. If interactable is also null in that case, it will return the transform position of this GameObject.
Declaration
public Vector3 GetClosestPointOfAttachTransform(IXRInteractor interactor)
Parameters
| Type | Name | Description |
|---|---|---|
| IXRInteractor | interactor | The IXRInteractor interacting with the XRInteractableSnapVolume used to get the attach transform. |
Returns
| Type | Description |
|---|---|
| Vector3 | The closest point on the snapToCollider if possible. Defaults to the interactable
attach transform position of the associated |