For use with Godot 3.2 and the Godot Oculus Quest Toolkit
This branch is used to track the version of the Godot Oculus Mobile Plugin that is used in the Godot Oculus Quest Toolkit https://github.com/NeoSpark314/godot_oculus_quest_toolkit. It only supports the Oculus Quest. The main version of this plugin can be found at https://github.com/GodotVR/godot_oculus_mobile.
A compiled plugin of this branch is available in the toolkit repository at https://github.com/NeoSpark314/godot_oculus_quest_toolkit/tree/master/addons/godot_ovrmobile
After cloning this repository make sure to initialise the submodules with git submodule init
.
When you've pulled a newer version make sure to run git submodule update
.
The project uses cmake
as its primary build system, which you can configure by following the setup instructions
for the Android SDK & NDK.
- Download and setup the Android SDK.
- If using Android Studio, download version 3.5 or higher.
- If using the command line tools, download revision 26.1.1 or higher.
- To ensure you have the latest version, check SDK Manager for updates.
- Add the Android SDK cmake binaries directory to the environment path. The directory can be found under
<android_sdk_location>/cmake/<cmake_version>/bin
.- Ensure that
cmake_version
is greater or equal to version3.6.0
.
- Ensure that
- Download and setup the latest version (version r20 or higher) of the Android NDK.
- Set the environment variable
ANDROID_NDK_HOME
to the Android NDK location.
By default the project is configured to checkout the godot_headers
repo as a submodule under the godot_headers
directory when you run
the git submodule init
and git submodule update
commands.
You can edit the GODOT_HEADERS_DIR
cmake variable in the CMakeLists.txt
build file if you'd like to provide a different source for the Godot headers.
- Download the latest version (Oculus Mobile SDK 20.0 (API 1.37.0) or higher)
of the Oculus Mobile SDK into the
ovr_sdk_mobile
directory (create the directory if it doesn't exist) - Download the latest version (OVRMRCLib 2.0) and upack it
into the
ovr_sdk_mobile\OVRMrcShimLib
directory (create the directory if it doesn't exist) - If needed, update the
OVR_ROOT_DIR
cmake variable in the theCMakeLists.txt
build file to point to the Oculus Mobile SDK containing folder
Note: Ensure you're using the Android SDK's version of cmake
.
In the project root directory:
- Navigate to the
build
directory:cd build
- Run:
cmake -GNinja ..
cmake --build .
Once the build successfully completes, the plugin and its dependencies shared libraries can be found in the
default output location: release/addons/godot_ovrmobile/libs/<arch>
When exporting the project apk in Godot, the following Android export
Xr Features
options should be set:
Xr Mode
must be set toOculus Mobile VR
.Degrees of Freedom
:- For Oculus Quest this must be set to
6DOF
- For Oculus Quest this must be set to
Hand Tracking
:- Select
None
if your app doesn't need hand tracking - Select
Optional
if your app can use hand tracking, but doesn't require it (i.e: also works with controllers). - Select
Required
if your app only uses hand tracking.
- Select
- This project is released under the MIT license.
- Please check the Oculus Mobile SDK license for information about the Oculus Mobile SDK used in this project.