Closed surreal6 closed 1 month ago
I see the same behavior with a Pico 4.
In my case, the provided MRP will never show the composition layer (only tested with remote debug).
When loaded directly in the first scene, the composition layer is shown as expected.
Thanks!
I just posted PR https://github.com/godotengine/godot/pull/98471 which fixes this issue in my testing when running directly on the Meta Quest headset (I didn't test with Quest Link).
Please let me know if this fixes the issue for you!
Tested versions
-Reproducible in 4.3.stable
System information
Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3060 Laptop GPU (NVIDIA; 31.0.15.3699) - AMD Ryzen 7 6800H with Radeon Graphics (16 Threads)
Issue description
When the composition layer is loaded dinamically, visibility is not working properly. Tested with Meta Quest 3 headset.
It has two different behaviours depending if running with Quest Link or with remote debug.
Quest link:
The comp layer is not visible until you take off the headset and put it again. Then the comp layer appears and the show/hide toggle works fine.
If you run the app from godot with the headset off the head, the comp will show correctly, but if you run the app with the headset on, the it will be invisible until you take it off and on again
Remote debug:
The comp layer is visible only if you load the app with the headset off, but it will be just for the first execution. If you close the app loaded in the device and run it again, comp will not appear.
With the remote debug installed in the device, it doesn´t respond to take off the headset, it is invisible all the time. (but the comp is there and you can interact with, but its invisible and show() hide() methods doesnt work.
Also changing visibility directly doesn't work, but visibility_changed signal is received.
NOTE: if i add the player.tscn to the main.tscn tree, it will work fine, it fails when i instantiate the player after the startXR initialization.
Steps to reproduce
I have a modified version of the Composition Layers Demo to show the bug.
I made the following changes:
In handle_pointers.gd:
added a simple function to toggle visibility of the composition layer each time the button is pressed
in startxr.gd
I added an xr_interface_ready signal to trigger the player scene loading in main
in main.tscn and main.gd
I removed all the XROrigin nodes branch to a new scene, called Player.tscn
I added a function to load the player with the composition layer after the xr_interface_ready signal is received.
(This is to reproduce the structure in my current project, where three diferent players are loaded depending on the xr configuration: roomscale, standing or flat mode)
Minimal reproduction project (MRP)
openxr_composition_layers_visiblility_bug.zip