Beispiel #1
0
        internal override void UpdateValues(CustomController vrControllers)
        {
            float value = UnityInputHelper.GetJoystickAxisRawValueByJoystickIndex(joystickID, inputIndex);

            if (invert)
            {
                value = -value;
            }

            foreach (int inputID in inputIDs)
            {
                vrControllers.SetAxisValueById(inputID, value);
            }
        }
Beispiel #2
0
        internal override void UpdateValues(CustomController vrControllers)
        {
            float value = UnityInputHelper.GetJoystickAxisRawValueByJoystickIndex(joystickID, inputIndex);

            bool state = value > 0.7f;

            if (!state)
            {
                return;
            }

            foreach (int inputID in inputIDs)
            {
                vrControllers.SetButtonValueById(inputID, state);
            }
        }