Skip to main content
Participant
March 6, 2016

I've spent a month trying to figure this out.

Hi,

No matter what I try, I cannot detect a tap on the gear VR in unity. I've tried the following:

Input.GetMouseButtonDown(0) equals true
Input.GetMouseButtonDown(1)) equals true
Input.touchCount > 0
Input.GetButtonDown("Fire1") with the input mapping set as mouse 0 in the input settings.

OVRInput.Get(OVRInput.Button.One)

None of these work. I've attached my config input so you can see.

I find Oculus have a lack of correct documentation for developers. For example, It says to add the oculus home back button functionality, you should look at "MenuHome.cs". Well I searched for that file and couldn't find it. Then I found the file I should be looking at was "OVRPlatformMenu.cs". So in Utilities for Unity 5, it's not "MenuHome.cs", it's "OVRPlatformMenu.cs"
    This topic has been closed for replies.

    6 replies

    Inspiring
    March 6, 2016
    Interesting. Sorry about that.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    March 6, 2016
    You're making the correct calls.

    If it's not working then somehow your code is not being executed - put a debug just before it (verify you see it in editor with left mouse click - then on gearvr using logcat).

    I wrote up this blog post about the gear VR touchpad:

    http://talesfromtherift.com/gearvr-input-touchpad/
    Check out my Unity VR development blog: http://talesfromtherift.com @peterept
    Participant
    March 7, 2016
    Figured it out. It appears that a class extending "BaseInputModule", the method "Process" isn't called every game frame. And so when doing GetButtonDown, it skips the frame and doesn't register. When I changed it to GetButton, it worked.
    Up and Coming
    March 7, 2016
    Yes - button down and up events are only valid for one frame.

    You shouldn't be placing your code in a subclass of an Input Manager - it's job is to route events.

    Place your code in a separate MonoBehaviour whee you check in the Update() method.
    Check out my Unity VR development blog: http://talesfromtherift.com @peterept
    Meta Employee
    March 8, 2016
    Sorry for the hassle to get this going -- we'll work on improving the util scripts and docs for this.

    OVRInput does work for Android gamepads on GearVR, but the GearVR HMT touchpad has not been exposed through that API yet.

    You can refer to the current script for detecting touchpad taps and swipes in the Oculus Utilities @ /Assets/OVR/Moonlight/Scripts/OVRTouchpad.cs
    Up and Coming
    March 8, 2016
    "kersk" wrote:
    OVRInput does work for Android gamepads on GearVR, but the GearVR HMT touchpad has not been exposed through that API yet.


    Can you please make a note on https://developer.oculus.com/documentat ... -ovrinput/ stating this fact. I spent quite a while myself trying to figure this out.