I want to better understand the camera coordinate space that In ARKit's ARCamera tranform is in. In the documentation, it says
This transform creates a local coordinate space for the camera that is constant with respect to device orientation. In camera space, the x-axis points to the right when the device is in UIDeviceOrientation.landscapeRight orientation—that is, the x-axis always points along the long axis of the device, from the front-facing camera toward the Home button. The y-axis points upward (with respect to UIDeviceOrientation.landscapeRight orientation), and the z-axis points away from the device on the screen side.
Following this, the UIDeviceOrientation.landscapeRight documentation says:
The device is in landscape mode, with the device held upright and the home button on the left side.
When I try to understand this, it seems like there is a conflict between "the x-axis points to the right when the device is in UIDeviceOrientation.landscapeRight orientation"
and "that is, the x-axis always points along the long axis of the device, from the front-facing camera toward the Home button"
. The former has +x to the right, and the latter has +x to the left.
Here is how I picture "the x-axis points to the right when the device is in UIDeviceOrientation.landscapeRight orientation"
:
And this is how I picture "that is, the x-axis always points along the long axis of the device, from the front-facing camera toward the Home button"
:
Appreciate any help, thanks!
Update: It doesn't impact this question, but to make it more clear, the reason I am asking this is because I am interested in getting the x, y, and z geomagnetic data values from Core Location. In Core Location, if the phone is in Portrait mode, +x is right, +y is up, and +z is towards the user. So it would seem the camera coordinate system for ARKit is different than the camera coordinate system in Core Location.