Controller¶
It provides the interface for the controller.
Configure¶
setupConfig returns Controller device configure data before connect. It provides driver information to DeviceService. Check ControllerDevice.Config.
@Override
public Config setupConfig() {
Config configure = new Config();
configure.trackingSystemName = "Controller Device";
return configure;
}
Virtual D-Pad button on Touchpad
The Virtual D-Pad button would be implemented on Touchpad by default to make up no physical D-Pad on controller. The setup of Virtual D-Pad is as follows:
If there is a physical D-Pad on controller, user can use the following code in setupConfig() method to set “the support of D-Pad button” and disable “Virtual D-Pad button” mechanism on Touchpad.
int support = 0;
support |= ButtonMaskFromId(WVR.InputId_Alias1_DPad_Left);
support |= ButtonMaskFromId(WVR.InputId_Alias1_DPad_Up);
support |= ButtonMaskFromId(WVR.InputId_Alias1_DPad_Right);
support |= ButtonMaskFromId(WVR.InputId_Alias1_DPad_Down);
configure.supportedButton = support; // Use physical D-Pad button
configure.disableVirtualDpad = true; // Disable "Virtual D-Pad button" mechanism
Vibrator¶
triggerVibrator called by the VR app to trigger the vibrator.
@Override
public boolean triggerVibrator(int axis, long durationus) {
Debug.Log("get triggerVibrator Notification");
}