Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question HTC Vive Controllers with OpenXR

Discussion in 'VR' started by sujinkremujin, Jul 27, 2022.

  1. sujinkremujin

    sujinkremujin

    Joined:
    Sep 9, 2018
    Posts:
    6
    Hi everyone. I'm having a bit of an issue using the HTC Vive controllers with OpenXR and the XR Interaction Toolkit. I've set up my project with the XR Origin Prefab, as well as a grab interactable. I'm able to drive the camera and the two hands, but Unity doesn't seem to be reading any button inputs from the controller. When I set up an Input Action asset, Unity is unable to listen to the inputs from the Vive controllers. Are the controllers compatible with Untiy and OpenXR? Any help would be greatly appreciated.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,457
    Did you add the controllers to the supported OpenXR controllers?
     
  3. sujinkremujin

    sujinkremujin

    Joined:
    Sep 9, 2018
    Posts:
    6
    Yes, I did.

    upload_2022-7-28_9-10-15.png
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,457
    And how do you read the button input?
     
  5. sujinkremujin

    sujinkremujin

    Joined:
    Sep 9, 2018
    Posts:
    6
    I'm using the XR Interaction Manager with the XR Controller (Action-based) script. I was pretty much following this tutorial here:
    . The HMD and controller movements are working fine, but I'm unable to pick up any Grab Interactable objects.
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,457
    Can you do it in the VR simulator? Then you can see if it's an issue with your VR controlls or the system in general.

    And a screenshot of the code/input bits for the button check that would help.
     
  7. sujinkremujin

    sujinkremujin

    Joined:
    Sep 9, 2018
    Posts:
    6
    I can do it in the VR simulator and other VR applications fine. But Unity doesn't read my inputs in the editor. I'm not sure what you mean by the code/input bits for the button check. Do you mean within SteamVR?
     
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,457
    No, how do you read the input from the controller button in your project.

    And what do you mean in other VR applications? I meant does the picking up work in your project using the XR Interaction Toolkit simulator (to test without hmd)
     
  9. hutongtong

    hutongtong

    Joined:
    Apr 7, 2017
    Posts:
    1
    my camera can move, but hand can't move, can anyone help me
     
  10. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,457
    Make a new post and explain your setup