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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

no input from oculus rift controller buttons

Discussion in 'Editor & General Support' started by gfunq, Jun 1, 2019.

  1. gfunq

    gfunq

    Joined:
    Apr 21, 2015
    Posts:
    2
    simple question:
    does anyone having issues with getting button input from oculus rift controllers using the current oculus integration asset (ver. 1.37) from the asset store?
    do the methods like
    Code (CSharp):
    1. // returns true if the primary button (typically “A”) is currently pressed.
    2. OVRInput.Get(OVRInput.Button.One);
    and such (https://developer.oculus.com/documentation/unity/latest/concepts/unity-ovrinput/)
    still work?
    I'm new to working with oculus and still quite new to unity, but right now even the demo scenes from the sample framework delivered with the oculus implementation asset have dead buttons.
    Tried unity versions
    2018.4.1f1
    2018.3.7f1
    2017.4.27f1
    to no avail. Not even the finger poses of the avatar's hand change, when removing fingers from buttons. I'm pretty sure they did couple of days ago, when I had the very first tests of the implemetation asset. Yesterday the oculus app forced an update. Is the implementaion asset outdated now?
    This is the exceptional case for me to write in a forum, usually I find all the answers by googling and reading. Thaks for replying kindly
     
  2. Peecha

    Peecha

    Joined:
    Dec 2, 2013
    Posts:
    22
    I also have issues with the touch controllers.

    Simple scene with basic setup... OVRCameraRig, OVRManager and OVRInputModule...
    World canvas with buttons and the controllers don't trigger OnClick events.
    With Event Trigger on the button, i can get them to trigger (only) PointerEnter and PointerExit events.
    I am currently using those events to check if i am pointing at the button and then in Update i wait for OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger).

    Surely this workaround isn't the proper way of doing this or is it? :D

    Have you figured where is the problem?
     
    gfunq likes this.
  3. gfunq

    gfunq

    Joined:
    Apr 21, 2015
    Posts:
    2
    What I found out so far is: the controllers stay dead if you run your test, but don't cover the headset's inner sensor, the one that indicates "user's head is in the headset"
    means that
    Code (CSharp):
    1. OVRManager.HMDMounted ()
    must have occured at least once, after start
    then the controllers are fully active and stay so even after HMDUnmounted occurs. Which is weird, but I'm ok with that. No need to put stickers on the sensor :)

    This can not have been the actual issue. Since I had the headset on my head and covered the HMDMounted sensor etc.

    Still don't know, what the bug was.
    Last night the controllers and avatar's hands suddenly started to behave as they should. Buttons reacting, fingers moving.
    I literally didn't change anything, compared to all my efforts over many days before. I even worked on in the same project and same scene, just using keyboard input (since controller buttons would be just a "nice to have" for my current setup)
     
    Last edited: Jun 7, 2019
    ImpossibleRobert likes this.
  4. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    511
    Thank you so much, this was driving me mad. This makes testing again a tad more complicated as one cannot simply put the headset somewhere and just move the controllers :-/ I'll probably just comment this restriction out in the coding.