How to set height offset for XR camera?

Users’ height when they teleport on a ground, is depended by the height value from their devices. In most times, users are playing the game while sitting on a chair, which made their camera’s height inappropriate sometimes. For solving this case, players can toggle “seated mode” or “standing mode” in VRChat.

So how can I add height offset for XR camera in my babylon.js project like the “seated mode” in VRChat? And especially, I wanna keep the backward teleportation available after I set offset for Y axis, is that possible? (Adding offset on ground mesh is a method, but it’s kinda ugly)

You can set the camera offset by setting the camera.posistion.y value. About teleportation - I am not 100% what the question is, but if you want to show a playground that doesn’t work (or should work as you expect) it would be great!

1 Like