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 using the XR_EXT_eye_gaze_interaction or XR_ANDROID_eye_tracking extensions.
  • Face Tracking: Access real-time facial expression data using the XR_ANDROID_face_tracking extension to drive avatar animations.
  • Mouse Interaction: Support mouse and trackpad input profiles in XR using the XR_ANDROID_mouse_interaction extension.

Supported extensions

The following OpenXR extensions are supported when developing for Android XR in Godot:

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

Mouse Interaction

XR_ANDROID_mouse_interaction

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 Data Source

XR_EXT_hand_tracking_data_source

Godot Native OpenXR

Hand Tracking Mesh

XR_FB_hand_tracking_mesh

Vendors Plugin

Hand Tracking Aim

XR_FB_hand_tracking_aim

Vendors Plugin

Eye Gaze Interaction

XR_EXT_eye_gaze_interaction

Godot Native OpenXR

Palm Pose

XR_EXT_palm_pose

Godot Native OpenXR

DPad Binding

XR_EXT_dpad_binding

Godot Native OpenXR

Binding Modification

XR_KHR_binding_modification

Godot Native OpenXR

Spatial Entity

XR_EXT_spatial_entity

Godot Native OpenXR

Spatial Anchor

XR_EXT_spatial_anchor

Godot Native OpenXR

Spatial Plane Tracking

XR_EXT_spatial_plane_tracking

Godot Native OpenXR

Spatial Marker Tracking

XR_EXT_spatial_marker_tracking

Godot Native OpenXR

Spatial Persistence

XR_EXT_spatial_persistence

Godot Native OpenXR

Spatial Persistence Operations

XR_EXT_spatial_persistence_operations

Godot Native OpenXR

Future

XR_EXT_future

Godot Native OpenXR

User Presence

XR_EXT_user_presence

Godot Native OpenXR

Foveated Rendering

XR_FB_foveation

Godot Native OpenXR

Foveation Configuration

XR_FB_foveation_configuration

Godot Native OpenXR

Foveation (Vulkan)

XR_FB_foveation_vulkan

Godot Native OpenXR

Eye-Tracked Foveated Rendering

XR_META_foveation_eye_tracked

Godot Native OpenXR

Swapchain Update State

XR_FB_swapchain_update_state

Godot Native OpenXR

Frame Synthesis

XR_EXT_frame_synthesis

Godot Native OpenXR

Space Warp

XR_FB_space_warp

Vendors Plugin

Display Refresh Rate

XR_FB_display_refresh_rate

Godot Native OpenXR

Color Space

XR_FB_color_space

Vendors Plugin

Composition Layer Settings

XR_FB_composition_layer_settings

Vendors Plugin

Composition Layer Depth Test

XR_FB_composition_layer_depth_test

Vendors Plugin

Composition Layer Image Layout

XR_FB_composition_layer_image_layout

Vendors Plugin

Composition Layer Cylinder

XR_KHR_composition_layer_cylinder

Godot Native OpenXR

Composition Layer Equirect2

XR_KHR_composition_layer_equirect2

Godot Native OpenXR

Composition Layer Depth

XR_KHR_composition_layer_depth

Godot Native OpenXR

Composition Layer Color Scale Bias

XR_KHR_composition_layer_color_scale_bias

Godot Native OpenXR

Local Floor Reference Space

XR_EXT_local_floor

Godot Native OpenXR

Visibility Mask

XR_KHR_visibility_mask

Godot Native OpenXR

Spatial Containers

XR_EXT_spatial_container, XR_EXT_spatial_container_self_rendering

Godot Native OpenXR & Vendors Plugin

Extensions are provided by one of these sources:

  • Godot Native OpenXR: Core XR functionality is maintained directly within the Godot Engine.
  • Vendors Plugin: Android XR and vendor-specific spatial capabilities are provided through the Vendors Plugin repository. You must use the latest compatible version.