Example #1
0
        private void OnTriggerExit(Collider other)
        {
            PoseManager.OnHandObjectCollisionEnd(this, other.gameObject);

            PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);
            if (joint != PoseManager.HandJoint.IndexTip)
            {
                return;
            }

            CurJointIntersectionCount--;

            if (CurJointIntersectionCount == 0)
            {
                foreach (var elem in ApproachUI)
                {
                    elem.enabled = false;
                }

                if (isSelected)
                {
                    foreach (var elem in SelectUI)
                    {
                        elem.enabled = true;
                    }
                }
            }
        }
Example #2
0
        private void OnTriggerEnter(Collider other)
        {
            if ((DateTime.Now - lastObjectDestroyTime).TotalSeconds < Globals.SHELF_GESTURE_WAITING_PERIOD)
            {
                return;
            }

            var animScript = other.GetComponent <Animatable>();

            if (animScript != null && animScript.Creator != null &&
                animScript.Creator.GetInstanceID() == GetInstanceID())
            {
                animScript.Deselected();
                GestureManager.ProcessObjectDeletion(animScript);
                Destroy(animScript.gameObject);
                lastObjectDestroyTime = DateTime.Now;
                return;
            }

            PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);

            if (joint == PoseManager.HandJoint.IndexTip)
            {
                GestureManager.TryInstantiatingAnimatable(hand, this);
            }
        }
Example #3
0
        private void OnTriggerExit(Collider other)
        {
            PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);

            if (joint == PoseManager.HandJoint.IndexTip)
            {
                isOn = false;
                SwitchState();
            }
        }
Example #4
0
        private void OnTriggerEnter(Collider other)
        {
            PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);

            if (joint == PoseManager.HandJoint.IndexTip &&
                (DateTime.Now - stateSwitchTime).TotalSeconds >= Globals.UI_BUTTON_WAIT_TIME)
            {
                SwitchState();
                callback?.Invoke();
            }
        }
Example #5
0
 private void OnTriggerExit(Collider other)
 {
     PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);
     if (hand == OvrAvatar.HandType.Right && joint == PoseManager.HandJoint.IndexTip)
     {
         activeIntersections = Mathf.Max(activeIntersections - 1, 0);
         if (activeIntersections == 0)
         {
             emitter.EnableEmissionConeGestures = false;
             //Debug.Log("Disabling interactions with emission cone!");
         }
     }
     PoseManager.OnHandObjectCollisionEnd(animScript, other.gameObject);
 }
Example #6
0
        private void OnTriggerStay(Collider other)
        {
            if ((DateTime.Now - lastObjectDestroyTime).TotalSeconds < Globals.SHELF_GESTURE_WAITING_PERIOD)
            {
                return;
            }

            PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);

            if (joint == PoseManager.HandJoint.IndexTip)
            {
                GestureManager.TryInstantiatingAnimatable(hand, this);
            }
        }
Example #7
0
        private void OnTriggerStay(Collider other)
        {
            if (DisallowMultiple)
            {
                return;
            }

            PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);

            if (joint == PoseManager.HandJoint.IndexTip &&
                (DateTime.Now - lastActionTime).TotalSeconds >= 0.1f)
            {
                callback?.Invoke();
                lastActionTime = DateTime.Now;
            }
        }
Example #8
0
        private void OnTriggerEnter(Collider other)
        {
            PoseManager.OnHandObjectCollisionStart(this, other.gameObject);

            PoseManager.GetJointFromGameobjectName(other.name, out OvrAvatar.HandType hand, out PoseManager.HandJoint joint);
            if (joint != PoseManager.HandJoint.IndexTip)
            {
                return;
            }

            foreach (var elem in ApproachUI)
            {
                elem.enabled = true;
            }

            CurJointIntersectionCount++;
        }