Getting Started with Oculus Quest and Data Glove in Unreal

1. Prerequisites:

2. Android SDK installation

Go into the AndroidWorks subfolder of your Unreal Engine and run CodeWorks for Android application to setup the Android tool for Unreal:

More information on AndroidWorks can be found in the Unreal Engine documentation:

https://docs.unrealengine.com/en-US/Platforms/Mobile/Android/InstallingAndroidCodeWorksAndroid/index.html

3. Setup the Project Settings for Android

Follow the Oculus Quick Start Guide to setup the Settings for Oculus Quest development. Or copy the settings we used in the pictures below.

https://developer.oculus.com/documentation/quest/latest/concepts/unreal-quick-start-guide-quest/?locale=en_US#launch-the-unreal-project-on-the-oculus-quest

As reference here are the settings we are using:

Edit -> Project Settings -> Platforms -> Android SDK

Edit -> Project Settings -> Platforms -> Android

4. Select the Oculus VR Plugin from Settings/Plugins

5. Set the Controller Platform for the Hand BluePrints

Each Hand BluePrint (Left and Right) has a controller platform, that can be set to support Vive and Oculus Rift/Quest. In order to use the tracked location, first open the LeftHand BluePrint:

Then set the Controller Platform dropdown menu to Oculus Controller:

Next, hit the compile and save buttons on the modified LeftHand BluePrint.

Next, do the same steps for the RightHand BluePrint.

6. Build the project to Oculus Quest

Select Launch and Click on your Oculus Quest device

7. Pair your Data Gloves

Make sure your Data Gloves are paired in the Oculus Quest Bluetooth device menu before launching the App.

On your Oculus Quest, go into the Experimental section in the Settings and pair your Data Glove with the Oculus Quest in the Bluetooth menu.

Developer Notes

Rotation Offset for using the Oculus Quest with the Forte Data Glove 

Since the Oculus Touch Controllers are oriented on the Data Glove to maximize their view from the Quest’s camera, the hand models in Unreal require a rotation offset that can be set using the GloveController Blueprint API in the Setup section. However, one can also manually set the default rotation offset by editing the C++ GloveController field in the Create Data Glove function (shown below). The rotation may differ between different models with varying x/y/z forward settings they were exported with.

Miscellaneous details on the Android Data Glove plugin

  • The plugin is called DataGloveAndroid.jar, located in the Source/resources folder
  • DataGloveAPL.xml creates a few wrapper functions to pass data between the C++ to the plugin when running on Oculus Quest
  • The C++ uses JNI to find and use the DataGloveAPL.xml functions
  • If the Java environment can’t be found a warning message will be printed and found using ADB debugging. If the environment is not found the functions cannot be discovered, and thus no connection will take place between the glove and Quest.

Troubleshooting

  • Issue 1: hands are not moving or rotating
    • Make sure the controllers are paired with your Oculus Quest
    • Check controller power
    • Make sure the Oculus Controller was selected for the Controller Platform is set to Oculus Controller for both the RightHand and LeftHand Blueprint before building to the Quest