Issues implementing teleportation

I’m trying to add teleportation to my VR environments, and am having trouble. I had it working at one point, after having help from some people on this forum, but since then updates have come out and I can’t seem to get it working again.

Here’s a link to a working environment without teleportation PMH Cleaning Tree , and then a link to the same environment after I attempt to add teleportation PMH Cleaning Tree

Any help or tips would be greatly appreciated. Thank you!

adding @RaananW

I believe we had a quick conversation about it already, but -

your code initializes XR 3 times and uses async/await on top level which fails. So you will first need to fix your code before we are able help with specific issues.

Teleportation is a default part of the xr default experience, so there is little to nothing you need to do to get it to work, other than provide the ground mesh when initializing xr itself.

I see. I didn’t realize that was initializing it. Now that I see that of course it wasnt working. Thats what i get for blindly copying code. Could you show me an example of providing the ground mesh?

Check our docs pages : WebXR Demos and Examples | Babylon.js Documentation