viewMatrix issue

n ARKit viewMatrix is define as the transform matrix from world coordinate frame to camera frame coordinate. eg- this is from the console of Xcode and it is the output of frame?.camera.viewMatrix(for: orientation)

viewMatrix is Optional(simd_float4x4([[-0.21701495, -0.8391591, -0.49871516, 0.0], [-0.9272899, 0.017577814, 0.3739312, 0.0], [-0.3050214, 0.54360217, -0.78195834, 0.0], [0.15720224, -0.23272672, 0.0491977, 1.0]]))

forth raw is not [0,0,0,1] like. could you please explain me why is this?

the fourth column of the transformation matrix contains the translation component away from the world origin. I believe by default that ARKit sets the world origin to be the phone's position at the start of the ARSession. So, this means that you have moved your device away from the world origin since the start of the session, hence the translation component in the fourth column.

viewMatrix issue
 
 
Q