Virtual Reality

Original Video: Pico 4 Setup Youtube Tutorial

It's recommended not to upgrade OpenXR projects to newer versions. If it's necessary, make sure you update the vendor plugins!

Downloads

  • Get the correct Java SDK. The Gradle version used when writing this was 8.11.1, which only supports up to Java 23 (according to claude opus 4.6). Make sure it's correctly linked in Editor Settings/Export/Android
  • Install Android Studio for the Android SDK.

  • Get the latest OpenXR vendors plugin (github)

Either load down the godot-openxr-vendors-android-native-symbols-debug.zip or the godot-openxr-vendors-android-native-symbols-release.zip. Inside is a plugins folder, extract that into the project.

Project Setup

TODO: Check if vulcan renderer already works with current pico plugin.

Export Templates

Make sure the export templates are downloaded, otherwise do that via Editor/Manage Export Templates.

Android Build Template

Install it via Project/Install Android Build Template.

Project Settings

  • In the XR tab of the project settings set OpenXR to enabled.
  • In the shaders tab enable the shaders.
  • In the Rendering/Textures tab activate Import ETC2 ASTC.
  • Optional: Varibale Rate Shading can be activated under Rendering/VRS

Scene Setup

A basic VR control setup looks like this:

openxr_scene_setup

  • XROrigin3D sets the origin in the world
  • XRCamera3D defines the viewpoint. It's a basic camera node with some VR additions.
  • XRController3D is a helper node representing a tracked controller.
extends Node3D

# Set the viewport to use OpenXR.
func _ready() -> void:
    var interface : OpenXRInterface = XRServer.find_interface("OpenXR")
    if interface and interface.is_initialized():
        get_viewport().use_xr = true

Export Setup

In the export window create a new Android Build Preset.

  • Activate Use Gradle Build
  • Set XR Mode to OpenXR. (Default is regular.)
  • Activate the Pico Plugin.

This should be enough to successfully build a Pico APK.