How to move positions using WebVR camera

Hello! I have a playground that has two room meshes. I want users to be able to switch between being in each room. However, I haven’t been able to get my WebVR camera to change its position coordinates. Ideally, I’d set it up so that upon selecting a button with an XR motion controller a user would be able to switch between the two rooms. Would anyone be able to point me in the direction of a solution? Thanks!

Pinging our XR overlord @RaananW

Hey!

You can change the camera’s position on pointer down (or up).Something like this:

https://www.babylonjs-playground.com/#NGS9AU#160

There should be a few extra checks (especially - am I in XR?) , but this can get you started :slight_smile:

Thanks so much Raanan, that was supremely helpful!

1 Like