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
XROrigin3Dnode, containing anXRCamera3D(representing the headset) andXRController3Dnodes (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 .
godotproject 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_trackingextension. Access hand joint data throughXRController3Dor 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_trackingextension 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 |
Vendors Plugin |
|
Raycast |
Vendors Plugin |
|
Trackables (Planes/Depth) |
Vendors Plugin |
|
Object Tracking |
Vendors Plugin |
|
Vendors Plugin |
||
Vendors Plugin |
||
Vendors Plugin |
||
Vendors Plugin |
||
Vendors Plugin |
||
Vendors Plugin |
||
Vendors Plugin |
||
Vendors Plugin |
||
Unbounded Reference Space |
Vendors Plugin |
|
Godot Native OpenXR |
||
Godot Native OpenXR |
||
Vendors Plugin |
||
Godot Native OpenXR |
||
Vendors Plugin |
||
Display Refresh Rate{:.external} |
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.