Oculus Go Development

On 6/23/20 Oculus announced plans to sunset Oculus Go. Information about dates and alternatives can be found in the Oculus Go introduction.

Oculus Quest Development

All Oculus Quest developers MUST PASS the concept review prior to gaining publishing access to the Quest Store and additional resources. Submit a concept document for review as early in your Quest application development cycle as possible. For additional information and context, please see Submitting Your App to the Oculus Quest Store.

VrApi Input API

This document describes using the VrApi Input API.

The VrApi Input API allows applications linked to VrApi to enumerate and query the state of devices connected to a Mobile VR device. When a device is enumerated, its current state can be queried using the Input API.

The Input API is defined in VrApi/Src/VrApi_Input.h. For sample usage, see VrSamples/Native/VrController.

System Input and SIGILL

The mobile VR runtime reserves the Home, Volume Up, and Volume Down buttons for system input. Applications will never see Home and Volume buttons. In order to capture this input from all input devices, the VR runtime uses a SIGILL interrupt handler to hook input in the VR application process. If your engine uses a SIGILL handler, it may conflict with the mobile VR runtime’s SIGILL handler and cause undefined behavior.

Controllers and Reserved Interactions

Some buttons on the controller are reserved for system use and will not appear in the button state on either input device. Please see the Reserved User Interactions page for more information about reserved interactions.

The supported controllers for the selected device are as follows:

Oculus Touch Controllers

Oculus Quest comes with two 6DoF Oculus Touch controllers. Each Oculus Touch controller has a grip trigger, an index trigger, two face buttons, and a clickable thumb stick. The face buttons, index trigger, and grip trigger are capacitive.

The left controller has a Menu button, and the right controller has a system-reserved Home button. You must insert batteries into both controllers before powering on the headset.

Oculus Go Controller

The Oculus Go controller is an orientation-tracked input device. The controller is positioned relative to the user by using a body model to estimate the location based upon the orientation of the device.

Left-handedness versus right-handedness is specified by users during controller pairing and is used to determine which side of the user’s body to position the controller.

The Oculus Go controller has a touchpad, a trigger, and a Home and Back button.

Device Connection and Disconnection

Devices are considered connected once they are enumerated through vrapi_EnumerateInputDevices, and when vrapi_GetInputTrackingState and vrapi_GetCurrentInputState return valid results.

vrapi_EnumerateInputDevices does not do any significant work and may be called each frame to check if a device is present or not.

Querying Device Input State

The state of the input device can be queried via the vrapi_GetCurrentInputState function.

Both functions take device IDs and pointers to ovrInputStateHeader structures. Before calling these functions, fill in the header’s ControllerType field with the type of device that is associated with the passed device ID. Make sure the structure passed to these functions is not just a header, but the appropriate structure for the device type. For instance, when querying a controller, pass an ovrInputTrackedRemoteCapabilities structure with the Header.ControllerType field set to ovrControllerType_TrackedRemote.

ovrInputStateTrackedRemote remoteState;
remoteState.Header.ControllerType = ovrControllerType_TrackedRemote;
if ( vrapi_GetCurrentInputState( ovr, controllerDeviceID, &remoteState.Header ) >= 0 )
{
// act on device state returned in remoteState
}

vrapi_GetCurrentInputState returns the controller’s current button and trackpad state.

Querying Device Tracking State

To query the orientation tracking state of a device, call vrapi_GetInputTrackingState and pass it a predicted pose time. Passing a predicted pose time of 0 will return the most recently sampled pose.

ovrTracking trackingState;
if ( vrapi_GetInputTrackingState( ovr, controllerDeviceID, &trackingState ) >= 0 )

VrApi implements an arm model that uses the controller’s orientation to synthesize a plausible hand position each frame. The tracking state will return this position in the Position field of the predicted tracking state’s HeadPose.Pose member.

Controller handedness may be queried using vrapi_GetInputDeviceCapabilities as described in Enumerating Devices above.

Applications that implement their own arm models are free to ignore this position and calculate a position based on the Orientation field that is returned in the predicted tracking state’s pose.

Touchpad Swiping Gestures

For touchpads, the user interface of your VR experience should follow these natural scrolling and swiping gestures:

  • Swipe up: Pull content upward. Equivalent to scrolling down.
  • Swipe down: Pull content downward. Equivalent to scrolling up.
  • Swipe left: Pull content left or go to the next item or page.
  • Swipe right: Pull content right or go to the previous item or page.