Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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:
    529
    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:
    120
    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:
    529
    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.