Head Mounted Display (HMD)

Head Mounted Display (HMD) provides the interface for the headset.

Configure

setupConfig returns HMD device configure data before connect. It provides driver information to DeviceService. Check HmdDevice.Config.

@Override
public Config setupConfig() {
    Config configure = new Config();
    configure.screenOrientation = WVR.ScreenOrientation_Landscape;
    return configure;
}

Please note that different platforms support quite inconsistent screen orientations depending on the hardware design of the HMD. PluginKit provides four options for screen orientations such as WVR.ScreenOrientation_Landscape, WVR.ScreenOrientation_Portrait, WVR.ScreenOrientation_Reverse_Landscape, and WVR.ScreenOrientation_Reverse_Portrait.

Proximity Sensor

If there is a proximity sensor on the headset, you will need to enable it to be able to use it. When the proximity sensor is covered, call triggerProximity(true). Otherwise, call triggerProximity(false).

bool IsPSensorCovered = true;
triggerProximity(IsPSensorCovered);

Note

When the user puts on or takes off the headset, it will call onResume() or onPause().