Esempio n. 1
0
 // Token: 0x0600211C RID: 8476 RVA: 0x000A35CD File Offset: 0x000A17CD
 private void OnHandHoverEnd(Hand hand)
 {
     InputModule.instance.HoverEnd(base.gameObject);
     ControllerButtonHints.HideButtonHint(hand, new EVRButtonId[]
     {
         EVRButtonId.k_EButton_Axis1
     });
     this.currentHand = null;
 }
Esempio n. 2
0
 //-------------------------------------------------
 private void HandHoverUpdate(Hand hand)
 {
     //Trigger got pressed
     if ((ViveInput.GetPressDown(HandRole.LeftHand, ControllerButton.Trigger)))
     {
         hand.AttachObject(gameObject, attachmentFlags, attachmentPoint);
         ControllerButtonHints.HideButtonHint(hand, Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger);
     }
 }
Esempio n. 3
0
 //-------------------------------------------------
 private void HandHoverUpdate(Hand hand)
 {
     //Trigger got pressed
     if (hand.GetStandardInteractionButtonDown())
     {
         hand.AttachObject(gameObject, attachmentFlags, attachmentPoint);
         ControllerButtonHints.HideButtonHint(hand, EVRButtonId.k_EButton_SteamVR_Trigger);
     }
 }
Esempio n. 4
0
        //-------------------------------------------------
        public static void HideButtonHint(Hand hand, params SteamVR_Action_In[] actions)
        {
            ControllerButtonHints hints = GetControllerButtonHints(hand);

            if (hints != null)
            {
                hints.HideButtonHint(actions);
            }
        }
Esempio n. 5
0
        //-------------------------------------------------
        public static void HideButtonHint(BNG.Grabber hand, params ISteamVR_Action_In_Source[] actions)
        {
            ControllerButtonHints hints = GetControllerButtonHints(hand);

            if (hints != null)
            {
                hints.HideButtonHint(actions);
            }
        }
Esempio n. 6
0
 //-------------------------------------------------
 void OnDisable()
 {
     if (handHoverLocked)
     {
         ControllerButtonHints.HideButtonHint(handHoverLocked, Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger);
         handHoverLocked.HoverUnlock(GetComponent <Interactable>());
         handHoverLocked = null;
     }
 }
Esempio n. 7
0
        //-------------------------------------------------
        public static void HideButtonHint(Hand hand, params EVRButtonId[] buttons)
        {
            ControllerButtonHints hints = GetControllerButtonHints(hand);

            if (hints != null)
            {
                hints.HideButtonHint(buttons);
            }
        }
Esempio n. 8
0
 //-------------------------------------------------
 protected virtual void HandHoverUpdate(Hand hand)
 {
     if (hand.uiInteractAction.GetStateDown(hand.handType))
     {
         Debug.Log("hand is interacting!!!!!!!!!!!!!!!!!!!!!");
         Debug.Log(InputModule.instance.gameObject.name);
         InputModule.instance.Submit(gameObject);
         ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
     }
 }
Esempio n. 9
0
        //-------------------------------------------------
        protected virtual void HandHoverUpdate(Hand hand)
        {
            Debug.Log("Hovered Updated");

            if (hand.uiInteractAction != null && hand.uiInteractAction.GetStateDown(hand.handType))
            {
                InputModule.instance.Submit(gameObject);
                ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
            }
        }
Esempio n. 10
0
 private void HandHoverUpdate(Hand hand)
 {
     if (hand.GetStandardInteractionButtonDown())
     {
         hand.AttachObject(base.gameObject, this.attachmentFlags, this.attachmentPoint);
         ControllerButtonHints.HideButtonHint(hand, new EVRButtonId[]
         {
             EVRButtonId.k_EButton_Axis1
         });
     }
 }
Esempio n. 11
0
        //-------------------------------------------------
        protected virtual void HandHoverUpdate(Hand hand)
        {
            GrabTypes startingGrabType = hand.GetGrabStarting();

            if (startingGrabType != GrabTypes.None)
            {
                hand.AttachObject(gameObject, startingGrabType, attachmentFlags, attachmentOffset);
                ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
                //hand.HideGrabHint();
            }
        }
Esempio n. 12
0
 private void HandHoverUpdate(Hand hand)
 {
     if (hand.GetStandardInteractionButtonDown())
     {
         InputModule.instance.Submit(base.gameObject);
         ControllerButtonHints.HideButtonHint(hand, new EVRButtonId[]
         {
             EVRButtonId.k_EButton_Axis1
         });
     }
 }
Esempio n. 13
0
 private void OnDisable()
 {
     if (this.handHoverLocked)
     {
         ControllerButtonHints.HideButtonHint(this.handHoverLocked, new EVRButtonId[]
         {
             EVRButtonId.k_EButton_Axis1
         });
         this.handHoverLocked.HoverUnlock(base.GetComponent <Interactable>());
         this.handHoverLocked = null;
     }
 }
Esempio n. 14
0
        //-------------------------------------------------
        private void OnHandHoverEnd(Hand hand)
        {
            ControllerButtonHints.HideButtonHint(hand, Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger);

            if (driving && hand.GetStandardInteractionButton())
            {
                StartCoroutine(HapticPulses(hand.controller, 1.0f, 10));
            }

            driving         = false;
            handHoverLocked = null;
        }
Esempio n. 15
0
 private void OnHandHoverEnd(Hand hand)
 {
     ControllerButtonHints.HideButtonHint(hand, new EVRButtonId[]
     {
         EVRButtonId.k_EButton_Axis1
     });
     if (this.driving && hand.GetStandardInteractionButton())
     {
         base.StartCoroutine(this.HapticPulses(hand.controller, 1f, 10));
     }
     this.driving         = false;
     this.handHoverLocked = null;
 }
Esempio n. 16
0
        //-------------------------------------------------
        protected virtual void OnHandHoverEnd(Hand hand)
        {
            InputModule.instance.HoverEnd(gameObject);
            ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
            currentHand = null;

            //custom
            //if (clickTimer > 0)
            //         {
            //	InputModule.instance.Submit(gameObject);
            //}
            InputModule.instance.Submit(gameObject);
        }
Esempio n. 17
0
        //-------------------------------------------------
        private void OnHandHoverEnd(Hand hand)
        {
            ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
            //hand.HideGrabHint();

            if (driving && hand)
            {
                //hand.TriggerHapticPulse() //todo: fix
                StartCoroutine(HapticPulses(hand, 1.0f, 10));
            }

            driving         = false;
            handHoverLocked = null;
        }
Esempio n. 18
0
        //-------------------------------------------------
        private void HandHoverUpdate(Hand hand)
        {
            GrabTypes startingGrabType = hand.GetGrabStarting();
            bool      isGrabEnding     = hand.IsGrabbingWithType(grabbedWithType) == false;

            if (grabbedWithType == GrabTypes.None && startingGrabType != GrabTypes.None)
            {
                grabbedWithType = startingGrabType;
                // Trigger was just pressed
                lastHandProjected = ComputeToTransformProjected(hand.hoverSphereTransform);

                if (hoverLock)
                {
                    hand.HoverLock(interactable);
                    handHoverLocked = hand;
                }

                driving = true;

                ComputeAngle(hand);
                UpdateAll();

                //hand.HideGrabHint();
                ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
            }
            else if (grabbedWithType != GrabTypes.None && isGrabEnding)
            {
                // Trigger was just released
                if (hoverLock)
                {
                    hand.HoverUnlock(interactable);
                    handHoverLocked = null;
                }

                driving         = false;
                grabbedWithType = GrabTypes.None;
            }

            if (driving && isGrabEnding == false && hand.hoveringInteractable == this.interactable)
            {
                ComputeAngle(hand);
                UpdateAll();
            }
        }
Esempio n. 19
0
        //-------------------------------------------------
        private void HandHoverUpdate(Hand hand)
        {
            //Trigger got pressed
            if (hand.GetStandardInteractionButtonDown())
            {
                plateAnimator.SetTrigger("plateCollision");

                plateIndex = Random.Range(0, 3);
//				GameObject plateOnHand = Instantiate (plates[plateIndex]);
                GameObject plateOnHand = Instantiate(plates[plateIndex], new Vector3(hand.transform.position.x, hand.transform.position.y, hand.transform.position.z), new Quaternion(0, 0, 0, 0));
//				hand.AttachObject (plateOnHand, Hand.AttachmentFlags.ParentToHand, attachmentPoint);
//				hand.Attac

                //go plate = Instantiate plate prefab code
                //hand.attchObject(plate)


                //hand.AttachObject( gameObject, attachmentFlags, attachmentPoint );
                ControllerButtonHints.HideButtonHint(hand, Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger);
            }
        }
Esempio n. 20
0
        //-------------------------------------------------
        private void HandHoverUpdate(Hand hand)
        {
            if (hand.GetStandardInteractionButtonDown())
            {
                // Trigger was just pressed
                lastHandProjected = ComputeToTransformProjected(hand.hoverSphereTransform);

                if (hoverLock)
                {
                    hand.HoverLock(GetComponent <Interactable>());
                    handHoverLocked = hand;
                }

                driving  = true;
                steering = true;

                ComputeAngle(hand);
                UpdateAll();

                ControllerButtonHints.HideButtonHint(hand, Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger);
            }
            else if (hand.GetStandardInteractionButtonUp())
            {
                // Trigger was just released
                if (hoverLock)
                {
                    hand.HoverUnlock(GetComponent <Interactable>());
                    handHoverLocked = null;
                }
                steering = false;
            }
            else if (driving && hand.GetStandardInteractionButton() && hand.hoveringInteractable == GetComponent <Interactable>())
            {
                ComputeAngle(hand);
                UpdateAll();
            }
        }
Esempio n. 21
0
 //-------------------------------------------------
 protected virtual void OnHandHoverEnd(Hand hand)
 {
     InputModule.instance.HoverEnd(gameObject);
     ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
     currentHand = null;
 }
Esempio n. 22
0
 //-------------------------------------------------
 private void OnHandHoverEnd(Hand hand)
 {
     InputModule.instance.HoverEnd(gameObject);
     ControllerButtonHints.HideButtonHint(hand, Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger);
     currentHand = null;
 }
Esempio n. 23
0
 //-------------------------------------------------
 private void OnHandHoverEnd(Hand hand)
 {
     ControllerButtonHints.HideButtonHint(hand, Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger);
 }
Esempio n. 24
0
 //-------------------------------------------------
 protected virtual void OnHandHoverEnd(Hand hand)
 {
     ControllerButtonHints.HideButtonHint(hand, hand.uiInteractAction);
     //hand.HideGrabHint();
 }
Esempio n. 25
0
 public void HideInteractUIHint(Hand hand)
 {
     ControllerButtonHints.HideButtonHint(hand, uiInteractAction); //todo: assess
 }
Esempio n. 26
0
 public void HideGrabHint(Hand hand)
 {
     ControllerButtonHints.HideButtonHint(hand, grabGripAction); //todo: assess
 }