How to Get Oculus Sensor Rotation or HMD Rotation Relative to the Sensor

I am currently developing a game to run our 2DOF Full 360 degree simulator with Oculus Rift. But I am having some problem to get Oculus work in the rotating simulator. This simulator can rotate infinetly on pitch and roll axes. I also mounted Oculus Sensor and HMD to this simulator. When the simulator rotates the camera also rotates following the HMD orientation of course. I’ve thought Oculus tracks HMD orientation relative to the sensor but it doesn’t. It gives World Rotation of the HMD. I’ve confirmed that using UHeadMountedDisplayFunctionLibrary::GetOrientationAndPosition(); which gives location of HMD relative to the sensor but orientation on world space. I couldn’t find any function in the APı to get the sensors rotation or HMD’s rotation relative to the sensor.

The game camera is actually attached to an actor which is rotating so it follows the the actor rotation. I just want to set it’s relative rotation as HMD’s rotation relative to the sensor. So camera can simulate the user’s head rotation which is about (+/- 20 degrees on each axis max) while it is following the Actor’s orientation which the camera attached.

Can you help me on this. I also asked this question to the Oculus Developer forum.

I’ve fixed my issue by calculating rotation of the Oculus relative to the simulator since I know both of their world rotation.