Search Unity

Question Steam VR/Valve Index problem - not detecting trigger button

Discussion in 'VR' started by matiko0, Jul 13, 2021.

  1. matiko0

    matiko0

    Joined:
    Feb 6, 2019
    Posts:
    7
    Hi guys!

    I did it - my first VR game which im really proud of. There is one catch! My triggers don't work when i use build version, in inspector everything is fine.

    How could I fix it?

    Code (CSharp):
    1. using Valve.VR;
    2.  
    3. ...
    4.  
    5. {
    6. public SteamVR_Action_Boolean booleanAction;
    7.  
    8. private void Update()
    9. {
    10. _triggerValue = booleanAction.state;
    11. if (_triggerValue == true)
    12. {
    13.     ...somethign happends...
    14. }
    15. }
    This just works perfect in editor mode :/
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,820
    So, the SteamVR plugin is developed and maintained by Valve. Please post your issues on their Github so their team can address.
     
  3. NevinAF

    NevinAF

    Joined:
    May 12, 2021
    Posts:
    36
    Sorry for the really late reply, only saw the message due to the bump from TreK-47. Leaving this hear for anyone who needs it:

    One thing you should look at is the controller binding within the build. Sometimes, the controls are not properly loaded when building.
    To open the controls, within the VR, hit Select->Controller Bindings. Here, you can debug any problems:
    - you should see the controls set to the name that you've created in the build (or a placeholder from auto-generated controls).
    - When selecting "Show Bindings on controllers", you should see when the buttons are being hit
    - You can switch to custom and open the input editor and assign any missing values or change their targets