Skip to content

Instantly share code, notes, and snippets.

@demonixis
Created May 23, 2023 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save demonixis/fc9d71c2389121cbc56d9e53ac079aef to your computer and use it in GitHub Desktop.
Save demonixis/fc9d71c2389121cbc56d9e53ac079aef to your computer and use it in GitHub Desktop.
Enable XR in Godot 4 project
extends Node3D
var interface : XRInterface
func _ready() -> void
interface = XRServer.find_interface("OpenXR")
if interface and interface.is_initialized():
get_viewport().use_xr = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment