main.gd 380 B

12345678910111213
  1. extends Node3D
  2. func _ready():
  3. var xr_interface : XRInterface = XRServer.find_interface("OpenXR")
  4. if xr_interface and xr_interface.is_initialized():
  5. var vp : Viewport = get_viewport()
  6. vp.use_xr = true
  7. func _process(delta):
  8. if Input.is_action_just_pressed("ui_cancel"):
  9. get_tree().quit()
  10. if Input.is_action_just_pressed("ui_accept"):
  11. get_tree().reload_current_scene()