WebXR teleportation works weirdly

Hello, I’ve added the WebXR into my scene but the teleportation is working weirdly. Here is a video of how it works in my scene and what I mean by working weirdly.

Video: https://imgur.com/a/u53RVBR

As you can see when I’m on the second floor teleportation works just fine and from the second floor I can also teleport to the first floor to any location I point at but when I move to the first floor teleportation doesn’t work correctly anymore and when I point to the floor to teleport to the location I want, the navigation mesh appears somewhere else or it doesn’t appear at all.

Do you guys have any idea what could possible be causing this weird behavior?

@RaananW is definitely the best to help here :slight_smile:

Seems like the inspection position is calculated incorrectly. Will you be able to share the scene with me, or reproduce that on the playground? Thanks!

@RaananW sorry for the late response, I managed to reproduce the same problem in playground.
And here is a video (https://imgur.com/a/hODVIsq) of the same problem in the playground. As you can see I can’t teleport onto the smaller house when standing on the green ground but I can teleport onto the larger house next to it. When standing on the larger house then teleporting onto the smaller house is possible. Also teleportation onto the smaller house works while standing on the orange colored ground. What is going on?

1 Like

Is there any update on this issue?


Sorry for not getting back to this post. Yes, I did check this scene - and it does behave weird, but this is expected from the way it is being used :slight_smile:

A groupd should be, well, a ground. You are using a complex model (the house) as a ground. If you expect to be able to teleport inside the house by just providing the house as a ground mesh - it won’t work as expected. You will either need to generate a new mesh for that, or separate the house to ground and walls. The 2nd floor can also be a ground mesh, of course.

Thank you for checking this issue out. I have a question, why is it that in this https://playground.babylonjs.com/#PWI83M I can teleport onto the bigger house ((house_2) same complex model as the smaller house (house_1)) from anywhere but not onto the smaller house? Why then the smaller house (house_1) becomes teleportable when standing on the bigger house (house_2) or other colored grounds except the green ground?

This is because of your position in space and the position of the mesh in world coordinates. Straight-line teleportation won’t work if the floor mesh’s y position is higher that the user’s y position (to prevent teleporting to upper floors when not wanting). Again, floor meshes were not meant to be tall meshes. expecting a (semi) flat surface, it makes sense to check that.

If you want to achieve that you will need to use the parabolic teleportation method (which is, technically, pointing your controller higher). Both are enabled per default.