Esempio n. 1
0
    private void Update()
    {
        if (leftHandDevice == default)
        {
            leftHandDevice = GetHand(InputDeviceCharacteristics.Left);
            if (leftHandDevice != default)
            {
                leftHand = new VRControllerInputValues(leftHandDevice);
                hands.Add(HorizontalSide.left, leftHand);
            }
        }
        else
        {
            leftHand.Update();
        }

        if (rightHandDevice == default)
        {
            rightHandDevice = GetHand(InputDeviceCharacteristics.Right);
            if (rightHandDevice != default)
            {
                rightHand = new VRControllerInputValues(rightHandDevice);
                hands.Add(HorizontalSide.right, rightHand);
            }
        }
        else
        {
            rightHand.Update();
        }
    }
Esempio n. 2
0
    protected override void SingletonAwake()
    {
        leftHandDevice = GetHand(InputDeviceCharacteristics.Left);
        if (leftHandDevice != default)
        {
            leftHand = new VRControllerInputValues(leftHandDevice);
            hands.Add(HorizontalSide.left, leftHand);
        }

        rightHandDevice = GetHand(InputDeviceCharacteristics.Right);
        if (rightHandDevice != default)
        {
            rightHand = new VRControllerInputValues(rightHandDevice);
            hands.Add(HorizontalSide.right, rightHand);
        }
    }