SteamVR_Controller.Device.GetTouchDown C# (CSharp) Méthode

GetTouchDown() public méthode

public GetTouchDown ( EVRButtonId buttonId ) : bool
buttonId EVRButtonId
Résultat bool
        public bool GetTouchDown(EVRButtonId buttonId)
        {
            return GetTouchDown(1ul << (int)buttonId);
        }

Same methods

SteamVR_Controller.Device::GetTouchDown ( ulong buttonMask ) : bool

Usage Example

        protected void Update()
        {
            if (_onPress != null)
            {
                _onPress.Value = Device.GetPress(ButtonMask);
            }
            if (_onTouch != null && Device.GetTouch(ButtonMask))
            {
                _onTouch.Value = Device.GetTouch(ButtonMask);
            }


            if (_onTouchDown != null && Device.GetTouchDown(ButtonMask))
            {
                _onTouchDown.OnNext(Unit.Default);
            }

            if (_onTouchUp != null && Device.GetTouchDown(ButtonMask))
            {
                _onTouchUp.OnNext(Unit.Default);
            }

            if (_onPressDown != null && Device.GetPressDown(ButtonMask))
            {
                _onPressDown.OnNext(Unit.Default);
            }

            if (_onPressUp != null && Device.GetPressUp(ButtonMask))
            {
                _onPressUp.OnNext(Unit.Default);
            }
        }
All Usage Examples Of SteamVR_Controller.Device::GetTouchDown