protected virtual void Start()
        {
            QuickVRPlayArea vrPlayArea = QuickSingletonManager.GetInstance <QuickVRPlayArea>();

            _leftHand = Instantiate(Resources.Load <QuickOVRHand>("Prefabs/pf_QuickOVRHandLeft"), vrPlayArea.GetVRNode(HumanBodyBones.LeftHand).transform);
            _leftHand.transform.ResetTransformation();

            _rightHand = Instantiate(Resources.Load <QuickOVRHand>("Prefabs/pf_QuickOVRHandRight"), vrPlayArea.GetVRNode(HumanBodyBones.RightHand).transform);
            _rightHand.transform.ResetTransformation();
        }
Exemplo n.º 2
0
        protected override bool ImpGetButton(string button)
        {
            if (QuickVRManager._handTrackingMode == QuickVRManager.HandTrackingMode.Hands && _ovrHands)
            {
                QuickOVRHand h = GetOVRhand(button);
                if (h.IsInitialized())
                {
                    //Pinching gestures
                    if (button.Contains("Pinch"))
                    {
                        if (button.Contains("Thumb"))
                        {
                            return(h.GetFingerIsPinching(OVRHand.HandFinger.Thumb));
                        }
                        if (button.Contains("Index"))
                        {
                            return(h.GetFingerIsPinching(OVRHand.HandFinger.Index));
                        }
                        if (button.Contains("Middle"))
                        {
                            return(h.GetFingerIsPinching(OVRHand.HandFinger.Middle));
                        }
                        if (button.Contains("Ring"))
                        {
                            return(h.GetFingerIsPinching(OVRHand.HandFinger.Ring));
                        }
                        if (button.Contains("Little"))
                        {
                            return(h.GetFingerIsPinching(OVRHand.HandFinger.Pinky));
                        }
                    }
                    else if (button.Contains("ThumbUp"))
                    {
                        return(h.IsThumbUp());
                    }
                    else if (button.Contains("ThumbDown"))
                    {
                        return(h.IsThumbDown());
                    }
                }
            }

            return(false);
        }