private void OnTriggerExit(Collider collider) { VRIInteractable interactable = VRIInteractables.GetInteractable(collider); if (interactable == null) { return; } if (CurrentlyHoveringOver.ContainsKey(interactable) == true) { if (CurrentlyHoveringOver[interactable].ContainsKey(collider) == true) { CurrentlyHoveringOver[interactable].Remove(collider); } } }
private void OnTriggerStay(Collider collider) { VRIInteractable interactable = VRIInteractables.GetInteractable(collider); if (interactable == null) { return; } if (CurrentlyHoveringOver.ContainsKey(interactable) == false) { CurrentlyHoveringOver[interactable] = new Dictionary <Collider, float>(); } if (CurrentlyHoveringOver[interactable].ContainsKey(collider) == false) { CurrentlyHoveringOver[interactable][collider] = Time.time; } }