summaryrefslogtreecommitdiff
path: root/modules/webxr
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2021-01-28 19:14:23 -0600
committerDavid Snopek <dsnopek@gmail.com>2021-01-28 19:24:27 -0600
commitf6e8da3661656173bcd17cfc11bdf1ff8c8b97b2 (patch)
tree4ea7f09274209a5924a42ba347deeb02c6d984ec /modules/webxr
parentfbb4742377326c25a6f804fb497186b4d461aa1c (diff)
Remove reference to CanvasLayer in WebXR example, because it can cause rendering issues in AR.
Diffstat (limited to 'modules/webxr')
-rw-r--r--modules/webxr/doc_classes/WebXRInterface.xml6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/webxr/doc_classes/WebXRInterface.xml b/modules/webxr/doc_classes/WebXRInterface.xml
index bddffd910e..9469e4d055 100644
--- a/modules/webxr/doc_classes/WebXRInterface.xml
+++ b/modules/webxr/doc_classes/WebXRInterface.xml
@@ -14,9 +14,9 @@
var vr_supported = false
func _ready():
- # We assume this node has a canvas layer with a button on it as a child.
+ # We assume this node has a button as a child.
# This button is for the user to consent to entering immersive VR mode.
- $CanvasLayer/Button.connect("pressed", self, "_on_Button_pressed")
+ $Button.connect("pressed", self, "_on_Button_pressed")
webxr_interface = XRServer.find_interface("WebXR")
if webxr_interface:
@@ -65,6 +65,7 @@
return
func _webxr_session_started():
+ $Button.visible = false
# This tells Godot to start rendering to the headset.
get_viewport().xr = true
# This will be the reference space type you ultimately got, out of the
@@ -73,6 +74,7 @@
print ("Reference space type: " + webxr_interface.reference_space_type)
func _webxr_session_ended():
+ $Button.visible = true
# If the user exits immersive mode, then we tell Godot to render to the web
# page again.
get_viewport().xr = false