Left/Right/Center Eye Anchor and Camera.main Transforms Have Latency

I’m trying to get the user head (and left, right eye) position in order to position virtual cameras for a portal effect. On an Oculus Quest using the Unity XR Plugin system, it appears that the values in Camera.main.transform as well as the anchors (updated by TrackedPoseDriver) are all at least one frame stale. That is, they are not consistent with what will actually be rendered for the current frame.

When running in Editor mode on the PC, this doesn’t happen. Camera.main.transform is exactly the camera transform for the upcoming frame. I can simulate the problem by introducing a single frame delay. Then, the view in my RenderTexture appears to “jitter” with any camera motion, as I see in VR.

Is this a known issue with either Unity XR, Oculus’s plugin, or is there some alternative way to access the correct transform?

Hi.

I am wondering if this one frame delay could be due to the Extra Latency Mode on Quest.

Or it could also be related to missed SubmitFrame due to performance drops.

There is a nice deep dive on the Oculus dev blog: Understanding Gameplay Latency for Oculus Quest, Oculus Go and Gear VR

Might be worth profiling your app to check if it is GPU or CPU bound.

hth.