MLWorldCameraFrame.camera_pose to Unity mapping

Hola,

ML2 OS version: 1.10.0
MLSDK version: 1.10.0
Host OS: Win

We use the World Camera images to reconstruct poses of our custom marker in the world camera frame. The mapping from the camera frame to the world frame using the MLWorldCameraFrame.camera_pose seems to work fine: When i walk around the marker its pose remains almost constant.

From within Unity we access the custom marker poses via an android AAR plugin. This all works but how do i convert from the "world co-ordinate system" referenced in the MLWorldCameraFrame docs to the respective Unity coordinate system ? I there any Magic Leap Native SDK (C API) function we can use for that ?

Btw. i have Zero (-0) Unity experience :wink:

Cheers

1 Like

If you are using Magic Leap SDK instead of the OpenXR plugin - you can try the following in Unity:

  1. Select the Main camera under the Magic Leap Rig in Unity.
  2. Make sure the XR Rig component does not have any offsets applied in the hierarchy or inspector.
  3. Look for the Magic Leap Camera Component in the Inspector.
  4. Disable the Recenter XR Origin on Start option.
  5. Then test the App again and see if the poses align properly.