[Gear VR] Setting actor rotation to headset rotation


I noticed that when using the first person template with the Gear VR(S6), the Fps-Arms do not follow the headset rotation correctly. Their position is not updated fast enough, which causes lag and stuttering(on the mesh). I have tried several methods to fix it, like using interpolation, using hmd rotation directly and trying to set the Arms rotation by using a Axis input event instead of Tick. I also tried setting the camera rotation manually similar to the landscape mountains example. So far i had no success, the mesh(or any other attached component) is still lagging behind the HMD orientation. This might be related to the Timewarp ?

Any help would be greatly appreciated.

The problem with using the HMD orientation for calculations on the game thread is that the final orientation/position is calculated later on the render thread and the left/right eye projection matrices are updated with the new values just prior to rendering to reduce latency.
Check out,

FViewExtension::PreRenderView_RenderThread(FRHICommandListImmediate& RHICmdList, FSceneView& View)


FViewExtension::PreRenderViewFamily_RenderThread(FRHICommandListImmediate& RHICmdList, FSceneViewFamily& ViewFamily)

within GearVRrenderer.cpp to see whats happening.

I believe you used to be able to toggle the update on the render thread with the console command ‘hmd updateonrt’ for debugging purposes
using ‘hmd stats’ to comfirm. but that doesnt seem to do anything anymore(at least not on the dk2).

It may be worth looking into the new motion controller interface to see how they are implementing “motioncontroller late update”(I havent had a chance yet.) as they must be getting hmd transforms on the render thread to correct the meshproxy’s location.

Thanks for the help!

I looked at the code and tried setting bUpdateOnRT=true in [GearVR.Settings] in the DefaultEngine.ini , but that does not have any effect.
The ‘hmd updateonrt’ is not recognized anymore.

Actually this error is related to Mobile HDR rendering. Without HDR there is no judder/timewarp lag on nearby objects.