Need help with figuring out VR movement

Hello!

I somewhat recently got into VR dev and i am struggling with setting up player rotation in VR
My setup currently looks like this:

And in my code i rotate the pivot, which is the XROrigin node:

Which does work but causes the issue that the rotation causes the player to orbit around the center of their playspace if the camera is not right in the middle of the playspace

What methods are there for rotating the view around the camera itself, especially considering that the camera has to be a child of the XROrigin node

Thanks!

This is not the way you handle movement in VR. You are dealing with real world tracking, so virtual movement is achieved by moving your XROrigin3D node around. Takes a bit of math to do right.

There is a good writeup of two often used approaches in the documentation:

You can find demos for both approaches in the demo repository:

I also created some video tutorials on the subject that hopefully provide some insight: