[SOLVED] Moving a VR camera from script

So i’ve made a Entity with a camera component attached to it. Moving it from code works fine, but as soon as I switch to VR mode I can’t move it anymore. There are no additional scripts on it when in VR mode.

            cameraEntity.setPosition(1, 1, 1); //works
            cameraEntity.camera.startXr(pc.XRTYPE_VR, pc.XRSPACE_LOCALFLOOR);
            cameraEntity.setPosition(1, 1, 1); //doesn't work

You want to move the parent of the camera, not the camera entity itself.

Screenshot 2022-06-16 at 12.10.24

This is because the camera entity is positioned based on the VR headset position in local space.

Oh okay, thank you! that works!