Topic was automatically imported from the old Question2Answer platform.
Asked By
thoth
I have a project that supports both VR (Oculus Quest 1) and desktop.
I currently set the android scene as the main scene, and run the desktop using the Play Scene F6 button with the desktop scene active.
I have read that it is possible to use a redirect scene whose main job is to get_tree().change_scene(url) . The question then becomes: how do I detect that the app is running on a VR headset in GDscript so I can switch to the environment-appropriate scene?
I have the same problem with my port of BeepSaber to Godot4. The game tries to load a VR plugin if none is found, the VR Simulator is used as a fallback. But I do not have an Oculus Quest, instead I use a Valve Index with Monado and Libsurvive. So I also want to detect the type of VR runtime and HMD. So you might wan’t to have a look at vr_autoload.gd.