Forum Discussion
dyfer
9 years agoPartner
Gear VR new controller & Unity button ID
Hi,
I would love to get the list of the Unity Buttons ID for the new Gear VR controller. I can only find the Oculus desktop ones :
https://docs.unity3d.com/Manual/OculusControllers.html
THX !
I would love to get the list of the Unity Buttons ID for the new Gear VR controller. I can only find the Oculus desktop ones :
https://docs.unity3d.com/Manual/OculusControllers.html
THX !
1 Reply
Replies have been turned off for this discussion
- kerskMeta EmployeeHi 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.IsControllerConnected(OVRInput.Controller.LTrackedRemote))
OVRInput.Controller controller = OVRInput.Controller.None;
if (
{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!
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago