Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Is Right Menu (Oculus) Button Of Touch Controller Accessible In Unity?

Does anyone definitively know whether the right menu (Oculus) button of the Oculus Touch Controllers is accessible in Unity? I understand this menu button is used for Oculus system-level activities (system level guardian recentering and accessing the application resume/quit menu) but I was wonder if I can augment and/or hijack this functionality with my own functionality in Unity.

When I use this API on the right controller, the 'pressed' variable is always false.

InputDevice.TryGetFeatureValue(CommonUsages.menuButton, out var pressed)
 
For the left controller, the 'pressed' variable returns accurate values when the left menu button is pressed/released.

I've not found documentation on the restricted behavior of the right menu button anywhere.

Comments

  • rh_galaxyrh_galaxy Posts: 114 Oculus Start Member
    If you use the unity input system, Input.GetKey(KeyCode.JoystickButton6) (left menu button) is the only way and there are no other menu buttons mapped. But thats not definitive, however the image in this documantation declares the (right) 'oculus button' to be 'reserved' which should be definitive.

    https://developer.oculus.com/documentation/unity/latest/concepts/unity-ovrinput/#touch-input-mapping
  • ratmat2000ratmat2000 Posts: 2
    NerveGear
    I found that it is possible to hook the right menu recenter event. To do this, you need to import the Oculus Utilities into your Unity app, add OVRManager to a game object in your scene and then add a callback like this:

    OVRManager.display.RecenteredPose += YourCallback; 
Sign In or Register to comment.