Developing for Oculus Quest
Before starting, there are two things you need to do:
First you need to go through the steps on the page. This leads you through installing the toolset that Godot needs to export to Android devices.
Next you need the Quest plugin. You can get it from the Asset Library or manually download it from here.
To get started open Godot and create a new project.
Make sure to choose the renderer. Due to the Quest’s GPU this backend is far better suited for the Quest.
Copy the addons folder from the Oculus Mobile asset into your Godot project. Your project tree should look similar to this:
Now you can start building the main scene:
Then add three child nodes to the origin node, one ARVRCamera and two nodes.
Assign controller ID 2 to the second ARVRController and rename that to .
Finally add a as a child node to our first ARVRController and create a box shape, resize the box so each side is set to 0.1. Now duplicate the and move it to the second ARVRController node. These will stand in for our controllers.
Now add a script to the main node and add the following code:
GDScript
Before you can export this project to the Quest you need to do three more things.
First go into the project settings and make sure that the main scene is the scene we run. Godot does not ask you to set this on export.
Then go into the export menu and configure a new Android export. If you still haven’t gone through the page do it now. If you didn’t you’ll have some red messages on this screen.
If you did you can forge ahead and make a few small changes to the export settings. First change the XR Mode to . Then change the Degrees of Freedom mode to .
Now save and close the export window.
Follow to setup your device for development.
Once your device is set up and connected, click the Android logo that should be visible in the top-right corner of the Godot editor. When clicked, it exports your project and runs it on the connected device. If you do not see this Android logo, make sure you have create an Android export preset and that the preset is marked as Runnable in the Export dialog.
The above does the bare minimum to get your project running on the Quest, it’s not very exciting. Holger Dammertz has made a great toolkit for the quest that contains a lot of scenes to get help you on your way including really nice controller meshes.
You can find the toolkit here.
If you want to help out with improving the plugin please join us .