Search Unity

HTC Vive: trigger or grip button keeps being pressed

Discussion in 'AR/VR (XR) Discussion' started by kunzej, Jan 8, 2017.

  1. kunzej

    kunzej

    Joined:
    Nov 27, 2016
    Posts:
    11
    I used to use the following two lines in Update() to find out if the user has pressed the trigger:

    Code (CSharp):
    1. device.GetPressDown(SteamVR_Controller.ButtonMask.Trigger)
    2. device.GetPressUp(SteamVR_Controller.ButtonMask.Trigger)
    Most of the time this works pretty well, but sometimes the button seems to be stuck: after releasing the trigger or grip, device.GetPressUp stays false in every frame (even calling this in FixedUpdate didn't help).

    So I changed my code to only use this:
    Code (CSharp):
    1. device.GetPress(SteamVR_Controller.ButtonMask.Trigger)
    However, I still have the same issue: sometimes this line keeps returning true even though I'm not touching the controller at all.

    Is this a Vive/Hardware bug, or am I doing anything wrong?
     
  2. kunzej

    kunzej

    Joined:
    Nov 27, 2016
    Posts:
    11
    Just wanted to mention that I'm able to reproduce this on another Vive. So it must be a software or firmware issue and not specifically my Vive.
    Does nobody else have this issue?

    A very easy way to reproduce this would be this Code:


    Code (CSharp):
    1.            
    2. if (device.GetPressUp(SteamVR_Controller.ButtonMask.Trigger))
    3.     Debug.Log("Up");
    4.  
    5. if (device.GetPressDown(SteamVR_Controller.ButtonMask.Trigger))
    6.     Debug.Log("Down");
    7.  
    If you then see the number of "Up" and "Down"s in your log, you'll see after some clicks that they will get off.
     
  3. TheFragen

    TheFragen

    Joined:
    Nov 18, 2015
    Posts:
    4
    I just wanted to bump this, as the issue still exist and is insanely annoying.
     
  4. AR_Rizvi

    AR_Rizvi

    Joined:
    Aug 12, 2013
    Posts:
    40
    I have this same issues where when i trigger it works fine but some time it stuck and take two or more trigger clicks to reset if some one has any info about this please share
     
  5. nikkipope

    nikkipope

    Joined:
    May 24, 2017
    Posts:
    1
    Not sure if this is a good permanent fix (I'm thinking a hardware defect is the root cause here), but I found that starting with the Vive controllers outside the frame of the trackers triggered this problem. Starting (i.e. booting up the game) with the controllers in the gaming area has seemed to fix the problem, at least for now.
     
  6. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,532
    There are some issues with the controller button quality, I've had issues (others confirmed as well) with the trackpad button and heard of other miscellaneous problems. That may not be the root cause for you but since there are other confirmed issues with buttons I wouldn't rule out bad hardware.

    A good way to test is to try other demos and see if it gives you the same issue.
     
  7. Plystire

    Plystire

    Joined:
    Oct 30, 2016
    Posts:
    142
    I can confirm that the problem still exists as of SteamVR 2.0.1

    Occasionally the buttons will "stick", and I haven't found a way to work around it. :(
    I have noticed that when a button is stuck, it will become corrected if any input is updated. So touching the touchpad will release a stuck grip/trigger button.

    [EDIT] I have opened an issue on their github
     
    Last edited: Dec 4, 2018
  8. HipNGroovy

    HipNGroovy

    Joined:
    Apr 25, 2020
    Posts:
    2
    Yep still an issue! Same symptoms as Plystire.