Develop with Godot for Android XR

Applicable XR devices
This guidance helps you build experiences for these types of XR devices.
XR Headsets
Wired XR Glasses

Godot's support for XR development is built on the OpenXR standard, ensuring that OpenXR features supported for Android XR are natively supported in Godot's XR system.

Follow this guide to learn about:

  • Godot Engine support for Android XR
    • Godot XR basics
    • Developing and publishing apps for Android XR
    • Godot OpenXR Vendors Plugin
    • Getting support
  • Input and interaction
  • Supported extensions

Godot engine support for Android XR

When you build Godot apps for Android XR, you leverage the high-performance, open-source spatial computing capabilities of Godot 4. While Godot provides native support for the core OpenXR specification, the Android XR Vendor Extensions in the Godot OpenXR Vendors Plugin provide the specific implementations required to support Android XR hardware.

Set up your project to get the latest versions of Godot and other tools and configure your development environment for Android XR.

Godot XR basics

If you are new to Godot or XR development, refer to the official Godot XR documentation to understand the core architecture. Here are a few key areas to explore:

  • XR Node Structure: Learn how to construct an XR scene using the XROrigin3D node, containing an XRCamera3D (representing the headset) and XRController3D nodes (representing hands or controllers).
  • OpenXR Integration: Godot uses an internal OpenXR interface to communicate with Android XR.
  • Godot XR Tools: A highly recommended library of components for common XR functions like movement, grabbing, and UI interaction.
  • Project Setup: Configuring your .godot project for Android export and spatial rendering.

Develop and publish apps for Android

Godot provides a streamlined workflow for exporting to Android:

  • Manage Android permissions in the Export dialog.
  • Configure the Android Export Preset (Minimum SDK 34).
  • Use the One-Click Deploy feature to test directly on Android XR devices.

Additionally, see the documentation for packaging and distributing apps for Android XR for specific requirements that apply to immersive apps that are distributed on the Google Play Store. Ensure your app also adheres to the quality guidelines for immersive experiences to provide a consistent and comfortable user experience on Android XR.

Godot OpenXR Vendors Plugin

To access Android XR specific features, you must use the Godot OpenXR Vendors plugin.

Android XR Vendor Extension

The Android XR Vendor Extension is the primary interface that adds Android XR support to Godot. It implements the OpenXR extensions required for environmental understanding, perception, and hardware-specific features.

Get support

If you encounter issues, see the support section for Godot on our support page for help.

Input and interaction

Godot uses a flexible Action Map system within OpenXR to handle various input methods. By defining actions (like select or grab) and binding them to the Android XR interaction profiles, you can create immersive experiences that work with both 6DoF motion controllers and hand tracking.

Android XR supports the following specific interaction methods within Godot:

  • Interaction Profiles: Configure standard profiles in the OpenXR Action Map to ensure consistent input across different hardware.
  • Hand Tracking: Provided through the XR_EXT_hand_tracking extension. Access hand joint data through XRController3D or specialized hand nodes provided by Godot XR Tools.
  • Eye Gaze: Retrieve eye gaze data as a standard input pose for UI focus or social presence features.
  • Face Tracking: Access real-time facial expression data using the XR_ANDROID_face_tracking extension to drive avatar animations.

Supported extensions

The following extensions are supported using the Godot OpenXR Vendors Plugin:

Feature or capability OpenXR extension string Provided by

Device Anchor Persistence

XR_ANDROID_device_anchor_persistence

Vendors Plugin

Raycast

XR_ANDROID_raycast

Vendors Plugin

Trackables (Planes/Depth)

XR_ANDROID_trackables

Vendors Plugin

Object Tracking

XR_ANDROID_trackables_object

Vendors Plugin

Scene Meshing

XR_ANDROID_scene_meshing

Vendors Plugin

Face Tracking

XR_ANDROID_face_tracking

Vendors Plugin

Eye Tracking

XR_ANDROID_eye_tracking

Vendors Plugin

Passthrough Camera State

XR_ANDROID_passthrough_camera_state

Vendors Plugin

Depth Texture

XR_ANDROID_depth_texture

Vendors Plugin

Light Estimation

XR_ANDROID_light_estimation

Vendors Plugin

Performance Metrics

XR_ANDROID_performance_metrics

Vendors Plugin

Recommended Resolution

XR_ANDROID_recommended_resolution

Vendors Plugin

Unbounded Reference Space

XR_ANDROID_unbounded_reference_space

Vendors Plugin

Hand Interaction

XR_EXT_hand_interaction

Godot Native OpenXR

Hand Tracking

XR_EXT_hand_tracking

Godot Native OpenXR

Hand Tracking Mesh

XR_FB_hand_tracking_mesh

Vendors Plugin

Foveated Rendering

XR_FB_foveation_vulkan

Godot Native OpenXR

Space Warp

XR_FB_space_warp

Vendors Plugin

Display Refresh Rate{:.external}

XR_FB_display_refresh_rate

Godot Native OpenXR

Extensions are provided by one of these sources:

  • Godot Native OpenXR: Core XR functionality is maintained directly within the Godot Engine.
  • Vendors Plugin: Google-specific spatial capabilities (prefixed with OpenXRAndroid) are provided through the Vendors Plugin repository. You must use the latest compatible version.