# How to make headpose the '0' startingpoint of the MagicLeap camera

**URL:** <https://forum.magicleap.cloud/t/how-to-make-headpose-the-0-startingpoint-of-the-magicleap-camera/1514>\
**Category:** Unity Development\
**Tags:** development, unity\
**Created:** [February 22, 2023, 2:18pm UTC](https://forum.magicleap.cloud/t/how-to-make-headpose-the-0-startingpoint-of-the-magicleap-camera/1514 "2023-02-22T14:18:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![met](https://avatars.discourse-cdn.com/v4/letter/m/3e96dc/32.png) [@met](https://forum.magicleap.cloud/u/met)\
**Post date:** [February 22, 2023, 2:18pm UTC](https://forum.magicleap.cloud/t/how-to-make-headpose-the-0-startingpoint-of-the-magicleap-camera/1514/1 "2023-02-22T14:18:16Z")

</div>

How to set the initial ML2 headposition as the spawning 0 point. The trouble I'm running into is that the 3D objects are at a static point, but I would like them to spawn in front of the ML user.

When I start the session, in my case for a split second the 3D cube spawns right in front of me, but then the camera origin spawning point (or headpose) makes it appear to the left or right of me. Whilst I have everything at 0 position.

Please see the enclosed screenshots, any help would be appreciated!

 ![Screenshot 2023-02-20 at 15.52.08](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/b251a78131492542eb7933ed7a942972153b7bc8.jpeg)  
 ![Screenshot 2023-02-20 at 15.53.16](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/ecfaeed9aad7a060dafeaf1b5756d88819076402.jpeg)

**Unity Editor version** : 2022.2.f1  
**ML2 OS version** : 1.1.0  
**MLSDK version** : 1.3.0  
**Host OS** : MacOS

---

<div class="post-metadata">

**Author:** ![sengelman](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/sengelman/32/11_2.png) [@sengelman](https://forum.magicleap.cloud/u/sengelman)\
**Post date:** [February 22, 2023, 5:37pm UTC](https://forum.magicleap.cloud/t/how-to-make-headpose-the-0-startingpoint-of-the-magicleap-camera/1514/2 "2023-02-22T17:37:00Z")

</div>

@met To disambiguate some confusion:

Headpose is an ongoing calculation of the headset position **from the point that it was first booted**. The "spawn" point that you're referring to in Unity is actually a reflection of all of the movement since the device was turned on.

As a concept in AR, this is why **it is important to ignore the literal headpose `Camera` position when placing virtual content**. Content should be placed _relative_ to something else (with a known position; see note on documentation below for more info). **Content should never be placed in a _specific_ position in your scene (such as an exact coordinate), because you don't necessarily control your users' environments**. This is a difference in VR development versus AR with 6 Degrees of Freedom.

I recommend reading up on our [Spatial Anchors](https://developer-docs.magicleap.cloud/docs/guides/unity/perception/anchors/spatial-anchors-overview) documentation to be able to accomplish relative content placement using best practices.

However, if you absolutely must reset your headpose to `(0, 0, 0)`, try the following, in-Scene:

**THIS IS NOT A BEST-PRACTICE WORKFLOW**

```csharp
      private IEnumerator Start()
        {
            // Wait for a frame so the XR system can initialize before moving the origin
            yield return new WaitForEndOfFrame();
            var xro = FindObjectOfType<Unity.XR.CoreUtils.XROrigin>();
            xro?.MoveCameraToWorldLocation(Vector3.zero);
            xro?.MatchOriginUpCameraForward(Vector3.up, Vector3.forward);
        }

```

A future update allow for this start-at-zero workflow natively, but this is not-yet enabled/possible.
