Nominalista
Nominalista

Reputation: 4838

Unexpected Behavior of Camera Up Vector in ARKit: Forward/Backward Tilt and Translation Effects

I’m encountering unexpected behavior with ARKit’s camera.transform property when I compute the camera’s up vector. I’m extracting the up vector using the following code:

let cameraUp = simd_make_float3(frame.camera.transform.columns.1)

I expected that tilting the device in any direction (forward/backward or left/right) would change the up vector’s values. However, I observed the following:

My questions are:

  1. Why doesn’t the camera up vector change when tilting the device forward/backward?
  2. What is the difference between camera.transform and camera.viewMatrix(for:) in ARKit, and how might that explain this behavior?

Any insights or explanations would be greatly appreciated.

Upvotes: -1

Views: 17

Answers (0)

Related Questions