0

I am on Godot v4.0.stable.mono.official of Godot and trying to start a VR project. The only script I have in the project looks like this:

extends Node3D  

var interface : XRInterface  

func _ready():  
    print('start') #never printed 
    interface = XRServer.find_interface("OpenXR") 
    if interface and interface.is_initialized(): 
        get_viewport().use_xr = true 

I am using a Quest 2 through virtual desktop to connect through steam VR and I am on Windows 11

When I try to run the debug the window opens for about 10 seconds with the Godot logo, then closes before ever getting to the first frame and running the _ready function. This does not happen when I do not enable OpenXR and XR Shaders, it just opens in flat mode of course. When I don't connect a headset as well, it gives me a warning to connect my HMD then starts in normal flat mode.

If you need any more info just ask.

Thanks in advance!

Hopeijay
  • 21
  • 3

2 Answers2

0

Try using Godot 4.0.1.stable.mono, it should work

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Apr 01 '23 at 19:43
0

I'm having the exact same issue, tried every engine version between and including 4.0 and the dev version of 4.2... seems to happen whenever the openxr module is enabled for me.