Skip to main content
This topic has been closed for replies.

1 reply

Meta Employee
September 11, 2017
Hi dyfer,

The GearVR Controller is not yet exposed through Unity's input system. We recommend using OVRInput.cs found in our Oculus Unity Utilities package to develop against the GearVR Controller for now. 

Here's a quick example usage of that:
...

OVRInput.Controller controller = OVRInput.Controller.None;

if (
OVRInput.IsControllerConnected(OVRInput.Controller.LTrackedRemote))
{
controller = OVRInput.Controller.LTrackedRemote;
}
else if (OVRInput.IsControllerConnected(OVRInput.Controller.RTrackedRemote))
{
controller = OVRInput.Controller.RTrackedRemote;
}

Vector2 touchpadPos = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad, controller);
bool touchpadPressed = OVRInput.Get(OVRInput.Button.One, controller);
bool backButtonPressed = OVRInput.Get(OVRInput.Button.Two, controller);
bool triggerPressed = OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger, controller);

...

You can also refer to the docs here for more details:
https://developer.oculus.com/documentation/unity/latest/concepts/unity-ovrinput/#unity-ovrinput

I hope that helps!