You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that the teleportation is detached immediately after creating the default WebXR experience. This is typically before controllers have loaded. I would expect that calling detach at any time fully disables teleportation, but in reality if a controller loads after the call, its thumbstick will cause the camera to turn. In fact, pushing forward on the thumbstick (to induce teleportation) causes an exception to be thrown.
Seems like detach ought to unregister from onControllerAdded observable.
The text was updated successfully, but these errors were encountered:
Interesting about the features manager... What's the right way to do it if I want teleportation disabled by default but optionally enabled later by the user?
the default experience manager has them both on per default. I can add this in the options (would actually make sense).
About enabling and disabling, you can use the attach and detach if the configuration didnt change, or re-enable if you want to change the initial configuration.
So if you don't want teleportation completely, disable the feature (using the features manager), and if you want to enable it later, use detach and attach. The main difference is that by re-enabling the feature is re-constructed, and (re)attach uses the old class again.
If you want a one-stop-shop, the features manager can do everything without touching the plugins at all, but you have the option to use the plugin directly.
Bugs
Repro playground: https://playground.babylonjs.com/#AM07G2#47
Notice that the teleportation is detached immediately after creating the default WebXR experience. This is typically before controllers have loaded. I would expect that calling
detach
at any time fully disables teleportation, but in reality if a controller loads after the call, its thumbstick will cause the camera to turn. In fact, pushing forward on the thumbstick (to induce teleportation) causes an exception to be thrown.Seems like
detach
ought to unregister fromonControllerAdded
observable.The text was updated successfully, but these errors were encountered: