/godot-xr:godot-xrfrom godot-xr
Godot 4 XR with OpenXR for VR, AR and passthrough on Meta Quest, Pico and PC VR. Use for XROrigin3D and XRController3D setup, the action map, locomotion, grabbing, in-world UI, hand tracking, passthrough, spatial anchors, or a Quest export, and when project.godot has xr/openxr/enabled=true.
Ships in godot-xr. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build VR and mixed-reality games in Godot 4 with the core OpenXR interface. Examples are GDScript; C# idioms belong to godot-csharp. Godot version notes and the facts that change between releases are in references/platform-features.md.
Start by reading the project's Godot version from config/features in project.godot and follow that version, not the newest; per-version changes are in the godot plugin's references/version-notes.md, if installed.
XROrigin3D is the play-space centre, with XRCamera3D and two XRController3D children (tracker = left_hand / right_hand, pose = aim or grip). Build at 1 unit = 1 metre.initialize():extends Node3D
var xr_interface: OpenXRInterface
func _ready() -> void:
xr_interface = XRServer.find_interface("OpenXR")
if xr_interface and xr_interface.is_initialized():
get_viewport().use_xr = true
xr_interface.session_begun.connect(_on_session_begun)
else:
push_error("OpenXR not initialized; is the headset connected and the runtime running?")
func _on_session_begun() -> void:
# Run physics at the headset's refresh rate to avoid judder.
var rate := xr_interface.display_refresh_rate
if rate > 0:
Engine.physics_ticks_per_second = roundi(rate)
V-Sync settings are ignored while OpenXR renders; the runtime paces frames. Don't tell users to change V-Sync for XR. The physics tick rate (60 by default) is what needs raising.
session_visible, session_focussed (input is live), session_stopping and pose_recentered. Pause or dim the game when focus is lost (system menu open, headset off). On Godot 4.7, user_presence_changed reports the headset being taken off; see the platform reference.| Task | Read |
|---|---|
| Buttons, triggers, thumbsticks, the action map, locomotion, snap turn, grabbing, pointer UI on a quad | references/input-and-interaction.md |
| Hand tracking, pinch and hand meshes; passthrough and blend modes | references/hands-and-passthrough.md |
| Quest/Android export, the OpenXR Vendors plugin, refresh rate, foveation, SpaceWarp, render models, spatial anchors, 4.5 to 4.7 changes | references/platform-features.md |
For production locomotion, grabbing and UI, suggest Godot XR Tools (GodotVR/godot-xr-tools) before hand-writing large systems; the references show the minimal versions.
XROrigin3D (or a body that carries it), never the XRCamera3D; the tracking system owns the camera transform.| Symptom | Cause | Fix |
|---|---|---|
| Headset shows nothing or the desktop view | use_xr not set, or OpenXR not enabled at startup | Set get_viewport().use_xr = true after the is_initialized() check; enable OpenXR in Project Settings and restart |
| No controller input | Action names don't match the action map | Open the OpenXR Action Map editor (bottom panel) and use its action names; see the input reference |
| Choppy physics or hands | Physics at 60 Hz on a 90 Hz headset | Set Engine.physics_ticks_per_second from display_refresh_rate |
| Trigger fires at odd pressure | Runtime thresholds on bool trigger actions vary | Bind triggers and grips as Float and apply your own threshold |
| Hand tracking returns nothing | Extension off, or the wrong tracker name | Enable xr/openxr/extensions/hand_tracking; trackers are /user/hand_tracker/left and /right |
| Quest export fails or runs flat | Missing gradle build or XR Mode | Install the Android build template, enable Use Gradle Build, set XR Mode to OpenXR, arm64 only |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin godot-xr