mirror of https://github.com/godotengine/godot
Merge pull request #45581 from Calinou/doc-webxrinterface-fix-code-sample
Fix WebXRInterface code sample in the class reference
This commit is contained in:
commit
f351cf1b8d
|
|
@ -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.
|
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:
|
Here's the minimum code required to start an immersive VR session:
|
||||||
[codeblock]
|
[codeblock]
|
||||||
|
extends Node3D
|
||||||
|
|
||||||
var webxr_interface
|
var webxr_interface
|
||||||
var vr_supported = false
|
var vr_supported = false
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue