Fix WebXRInterface code sample in the class reference

This also fixes the code sample's indentation to look correct in the
editor help.
This commit is contained in:
Hugo Locurcio 2021-01-30 15:58:09 +01:00
parent 46de553473
commit 3434074933
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

View file

@ -10,6 +10,8 @@
Since WebXR is based on Javascript, it makes extensive use of callbacks, which means that [WebXRInterface] is forced to use signals, where other AR/VR interfaces would instead use functions that return a result immediately. This makes [WebXRInterface] quite a bit more complicated to intialize than other AR/VR interfaces.
Here's the minimum code required to start an immersive VR session:
[codeblock]
extends Node3D
var webxr_interface
var vr_supported = false