MLCVCamera.GetFramePose to Unity mapping

I have similar issue.
I'm using the legacy MLSDK default configurations:

  • Under the XR Rig game object the session origin tracking mode origin set to Device
  • In the Main Camera game object, Recenter XR Origin At Start is disabled
  • I configure the inputSubsystem tracking origin mode to unbound and called to TryRecenter as defined in the Unity (OpenXR) MLCamera documentations (link)

But when I call to MLCVCamera.GetFramePose(extras.VCamTimestamp, out var outTransform) I get the transformation between the frame and the origin where the magic leap powered up and not where my application started.

I tried to set the subsystem tracking mode to Device, but the outTransform was the same.

I don't know what else can be done

I saw this thread and was requested to open new post:
MLWorldCameraFrame.camera_pose to Unity mapping

ML2 OS version: 1.11.0
MLSDK version: 1.11.0
Host OS: Windows

Hi @idanc

Sorry for the late reply, I noticed the post was categorized in the wrong place.

It sounds like you are having issues aligning the Unity Origin and the MLCamera API? Or are you using the B&W World Cameras?

You mention that you are using the MLSDK configuration. Is Magic Leap XR selected under the XR-plugin Manager Settings or is the OpenXR option selected?


You might be running into an issue that is a limitation of how input is handled inside the Unity Input System and the XR Plugins. As a workaround, you could parent your scene objects to a "root" transform. Then simply move the transform and all of it's children to the current camera position as a way to "recenter". This would visually have the same result as resetting the Unity Origin via the input system.