void OnTriggerExit(Collider otherCollider) { VentilatorAttachPoint attachPoint = otherCollider.GetComponentInParent <VentilatorAttachPoint>(); if (attachPoint != null) { HideTooltip(); ControllerInCollider = OVRInput.Controller.None; } }
void OnTriggerEnter(Collider otherCollider) { VentilatorAttachPoint attachPoint = otherCollider.GetComponentInChildren <VentilatorAttachPoint>(); OVRInput.Controller controller = Ventilator.GetComponentInChildren <OVRGrabbable>()?.grabbedBy?.Controller ?? OVRInput.Controller.None; if (attachPoint != null && controller != OVRInput.Controller.None && !Attached) { ControllerInCollider = controller; targetAttachPoint = attachPoint; ShowAttachTooltip(); } }