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. Dismiss Notice

Question use oculus controllers with input system?

Discussion in 'Input System' started by Innovine, Jan 31, 2023.

  1. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    How do I get the new Input System to wrap the oculus controllers?
    I want my game to be playable with a gamepad, or with the touch controllers. I just read the value of the joysticks and buttons, nothing else. I'd like the input system to encapsulate all of this, however the controllers provide input via OvrInput.Get() and not the input system. How should I deal with this?
     
  2. rdjadu

    rdjadu

    Joined:
    May 9, 2022
    Posts:
    102
    Create two control schemes, one for gamepad, one for Oculus Touch controller. Bind each action as needed.
     
  3. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    Can you provide a little more info on that, thanks? The documentation is just really confusing and messy, i dont understand any of it.
     
  4. baakta

    baakta

    Joined:
    May 22, 2019
    Posts:
    14
    OVRInput is the Oculus SDK provided way of reading controller input, but the Input System should be detecting and reading input from Oculus Touch Controllers out of the box via the XR plug-in that's installed with the package (I''m using 1.5, but should be true for 1.0.2+). When you're selecting a binding for an action in the InputAction GUI window, "Oculus Touch Controller" should be listed under "XR Controller". As rdjadu mentioned - just bind which control to actions as desired.

    Control Schemes (also mentioned above) are not required for you to use Oculus Touch input, but they're helpful for organizing and enabling input based on the player device.