Oculus Rift VR Controls setup to Rotate with Thumb Stick

Hey guys

Made a tutorial on how to setup the oculus rift so that when you move the thumb stick left and right in VR, the person will rotate.

Thank you


thanks for the tutorial - this really helped me! One question: If you move within your playspace the camera is no longer centered. If I then rotate with the thumb stick I don’t rotate around my camera but around the scene component. This feels strange because the player is no longer the center of the rotation - especially if you have a large playspace. Any ideas how to fix that? Thanks again!

ok, I found a solution - not sure if I can explaine it properly…

  1. I can’t rotate the camera component itself because it’s locked to the hmd.
  2. So I rotate the whole actor with “addActolocalRotation” as in Markom3d tutorial
  3. I calculate the distance between the camera position before and after the turn
  4. I move the whole actor parallel in the opposite direction

Now my turning is always centered around my HMD even if I move in my playspace.