How can I move a webxr camera through code? I am trying to emulate a plane where the user is stationary and motion is done through code. I want to know if I can manipulate the webxr camera that way.
adding @RaananW
Hi @trigangle,
the webxr camera can be moved using its .position
attribute, just like any other camera.
When using const xr = scene.createDefaultXRExperienceAsync({})
, how can I get the webxr camera object and how can I tell if that camera is the default one?
This function returns a promise that holds the default experience container, which in turn holds the base experience helper that has the camera and the session.
You can read about it here - WebXR Experience Helpers | Babylon.js Documentation