private void OnTriggerExit(Collider collider) { if (IsObjectInteractable(collider.gameObject)) { GameObject untouched; if (collider.gameObject.GetComponent <VRTK_InteractableObject>()) { untouched = collider.gameObject; } else { untouched = collider.gameObject.GetComponentInParent <VRTK_InteractableObject>().gameObject; } OnControllerUntouchInteractableObject(SetControllerInteractEvent(untouched.gameObject)); untouched.GetComponent <VRTK_InteractableObject>().ToggleHighlight(false); untouched.GetComponent <VRTK_InteractableObject>().StopTouching(this.gameObject); } if (hideControllerOnTouch) { controllerActions.ToggleControllerModel(true, touchedObject); } touchedObject = null; }