ARKit projectionMatrixForOrientation: is not constant (wobbles)

I'm using projectionMatrixForOrientation: to render my content on top of the ARKit camera image. I render the camera image as a textured quad, and draw the rest on top of it.

Alignment looks very good.

The problem is that the output of projectionMatrixForOrientation is not constant. The FOV wobbles significantly when the camera stops moving / refocuses. This causes the rendered scene to momentarily zoom in and back out.

[14:35:15.841] [I] 30727 proj = 
[ 1.640  0.000  0.000  0.000]
[ 0.000  2.186  0.000  0.000]
[ 0.018 -0.010 -1.000 -1.000]
[ 0.000  0.000 -0.001  0.000]

[14:35:15.864] [I] 30727 proj = 
[ 1.632  0.000  0.000  0.000]
[ 0.000  2.175  0.000  0.000]
[ 0.018 -0.010 -1.000 -1.000]
[ 0.000  0.000 -0.001  0.000]

[14:35:15.902] [I] 30727 proj = 
[ 1.654  0.000  0.000  0.000]
[ 0.000  2.205  0.000  0.000]
[ 0.018 -0.010 -1.000 -1.000]
[ 0.000  0.000 -0.001  0.000]

[14:35:15.923] [I] 30727 proj = 
[ 1.662  0.000  0.000  0.000]
[ 0.000  2.216  0.000  0.000]
[ 0.018 -0.010 -1.000 -1.000]
[ 0.000  0.000 -0.001  0.000]

Is this by design? I would expect camera intrinsics to be constant.

Should I not be calling projectionMatrixForOrientation: every frame?

I'll try calling it only when my app detects an orientation change. But I want the best-possible alignment of the camera and 3D content.
Hello,

You should not cache this value. You should call it every frame and use the new value that you receive.


The FOV wobbles significantly when the camera stops moving / refocuses. This causes the rendered scene to momentarily zoom in and back out.

If you feel that this is very noticeable and would break the illusion that the virtual content is in the real world, then I recommend that you file a bug report using Feedback Assistant and include a screen recording of the issue.

Thanks!

ARKit projectionMatrixForOrientation: is not constant (wobbles)
 
 
Q