GetInteractable() public static method

public static GetInteractable ( Collider collider ) : VRIInteractable
collider UnityEngine.Collider
return VRIInteractable
Exemplo n.º 1
0
        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);
                }
            }
        }
Exemplo n.º 2
0
        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;
            }
        }