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

GetTouchUp() public méthode

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

Same methods

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

Usage Example

Exemple #1
0
    //Runs every frame and handles the animation for the controllers when certain buttons are pressed.

    void Update()
    {
        if (device.GetTouch(SteamVR_Controller.ButtonMask.Trigger))
        {
            SetAnimation("Grab", false, true);
        }
        if (device.GetTouchUp(SteamVR_Controller.ButtonMask.Trigger))
        {
            SetAnimation("Grab", true, false);
        }
        if (device.GetPressDown(SteamVR_Controller.ButtonMask.Grip))
        {
            SetAnimation("Pinch", false, true);
        }
        if (device.GetPressUp(SteamVR_Controller.ButtonMask.Grip))
        {
            SetAnimation("Pinch", true, false);
        }

        if (device.GetTouch(SteamVR_Controller.ButtonMask.Touchpad))
        {
            Debug.Log("you touched the touchpad");
            if (pointer != null)
            {
                pointer.SetActive(true);
            }
        }
        if (device.GetTouchUp(SteamVR_Controller.ButtonMask.Touchpad))
        {
            if (pointer != null)
            {
                pointer.SetActive(false);
            }
        }
    }
All Usage Examples Of SteamVR_Controller.Device::GetTouchUp