Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

HTC Vive Controller input on unity 2017 in Javascript

Discussion in 'Scripting' started by Sollthar, May 16, 2020.

  1. Sollthar

    Sollthar

    Joined:
    Feb 11, 2010
    Posts:
    486
    I'm using an older Project I made back on Unity 2017 using javascript, which has since been discontinued it seems.

    I was wondering if there's a way to get a vive Controller input like

    if(Input.GetMouseButtonDown(0))

    for the mousebutton, but for the vive trigger or menu button.

    does anyone know? i can't find anything anywhere.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,517
    Check in on the AR/VR/XR forum here... I did this in the Oculus OVR stuff but forget what it was. It was just some call into the OVR API and it was just a static or singleton call, I forget what, but it has been years so it's probably different. Check the AR/VR/XR forum, or look online for examples.
     
  3. Sollthar

    Sollthar

    Joined:
    Feb 11, 2010
    Posts:
    486
    Thank you! I got it working using the basic scripts delivered in the htc vive package.
     
    Kurt-Dekker likes this.