# MLCVCamera.GetFramePose to Unity mapping

**URL:** <https://forum.magicleap.cloud/t/mlcvcamera-getframepose-to-unity-mapping/4976>\
**Category:** Unity Development\
**Tags:** camera-api, mlsdk\
**Created:** [January 12, 2025, 8:07am UTC](https://forum.magicleap.cloud/t/mlcvcamera-getframepose-to-unity-mapping/4976 "2025-01-12T08:07:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![idanc](https://avatars.discourse-cdn.com/v4/letter/i/a698b9/32.png) [@idanc](https://forum.magicleap.cloud/u/idanc)\
**Post date:** [January 12, 2025, 8:07am UTC](https://forum.magicleap.cloud/t/mlcvcamera-getframepose-to-unity-mapping/4976/1 "2025-01-12T08:07:56Z")

</div>

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](https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/ml-camera/#using-mlsdk-perception-pose-data))

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](https://forum.magicleap.cloud/t/mlworldcameraframe-camera-pose-to-unity-mapping/4830/8)

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

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [January 14, 2025, 4:24pm UTC](https://forum.magicleap.cloud/t/mlcvcamera-getframepose-to-unity-mapping/4976/2 "2025-01-14T16:24:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [January 30, 2025, 8:08pm UTC](https://forum.magicleap.cloud/t/mlcvcamera-getframepose-to-unity-mapping/4976/3 "2025-01-30T20:08:12Z")

</div>

This topic was automatically closed after 18 days. New replies are no longer allowed.
