I’m trying to set an actor’s world position and orientation to match an Oculus or HTC Vive VR headset. I was using GEngine->XRSystem->GetCurrentPose with device index 0, but the Z position is too low and the orientation has some kind of offset. I also tried getting the location/orientation of the camera through the camera manager, but it doesn’t seem to reflect the X and Y positions correctly.
Can someone tell me what’s the best way to do this outside of using Blueprints?
However, the results are still not quite correct, as there is some kind of rotation offset. I have the camera set to lock to the HMD, so I’m not sure what else I’m missing here.