What is the best way to manually update the WebXR default experience helper camera (WebXRCamera) position at runtime. I would like to place the the WebXRCamera in the cockpit of a race car for a VR racing style game.
If i just parent the WebXRCamera to the car and offset to be driver eye level… The position of the vr camera never moves.
If i get the global position of the driver in the cockpit and manually set the WebXRCamera.position every frame… its real choppy and the car mesh stutters
What is the best way to move a VR Camera manually via code and how come you cant parent the vr camera and move that parent transform and the vr camera should update its position as a child… right ?
The XR Camera doesn’t support parenting (yet!). You will need to update the position of the camera on each frame. It will be interesting to see how high-speed vr positioning change will work.
I will be working on adding webxr to the parenting system. The reason it is not working is that webxr is technically providing us with the view and projection matrices, so i initially didn’t want to change them. But it does make sense to allow the camera to attach to a different node.