NeoSpark314 / godot_oculus_quest_toolkit

An easy to use VR toolkit for Oculus Quest development using the Godot game engine
MIT License
367 stars 38 forks source link

Feature_VRSimulator.visible=false should hide the info_text #56

Open goatchurchprime opened 3 years ago

goatchurchprime commented 3 years ago

The infotext instructions are useful at first, but too large and get in the way when you are debugging.

This feature should already work, but or some reason, the visibility of the 3D node doesn't influence the visibility of the 2D node created below it. If doesn't even matter if you set the ColorRect 2D node to visible=false, the keeps setting it back to to true (is this a bug)?

The quickest method to get it to work is to insert if visible: above the line that inserts the node: https://github.com/NeoSpark314/godot_oculus_quest_toolkit/blob/master/OQ_Toolkit/OQ_ARVROrigin/scripts/Feature_VRSimulator.gd#L81

NeoSpark314 commented 3 years ago

There is an exported variable info_label_visible that can be set in the UI of the Feature_VRSimulator. Does this work for you?

https://github.com/NeoSpark314/godot_oculus_quest_toolkit/blob/b939f452426952ee6f0a1ba58a718ff600e4362e/OQ_Toolkit/OQ_ARVROrigin/scripts/Feature_VRSimulator.gd#L23

goatchurchprime commented 3 years ago

It does. But then I've found your hack to make it disappear on this line, where you are setting visible=false in the _process() function because it seems that the godot system keeps resetting it (as I found).

https://github.com/NeoSpark314/godot_oculus_quest_toolkit/blob/master/OQ_Toolkit/OQ_ARVROrigin/scripts/Feature_VRSimulator.gd#L243

Do you think this a godot bug, and should I try minimal project to reported it?

For now I think not adding the node is the best option if it's hidden. And using the visibility flag instead of an export var could be more lightweight.

NeoSpark314 commented 3 years ago

If you think it is a bug in godot a minimal reproducer is a good idea; but I think I have not yet understood what the problem is. I will try and see if I can reproduce it on my side by removing the set in the process...