# AR Anchor Creation Fails with 'Unbounded' Reference Space on Meta Quest 3

**URL:** <https://forum.babylonjs.com/t/ar-anchor-creation-fails-with-unbounded-reference-space-on-meta-quest-3/58132>\
**Category:** Bugs\
**Tags:** webxr, ar, quest\
**Created:** [April 29, 2025, 6:55am UTC](https://forum.babylonjs.com/t/ar-anchor-creation-fails-with-unbounded-reference-space-on-meta-quest-3/58132 "2025-04-29T06:55:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tapanij](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tapanij/32/50936_2.png) [@tapanij](https://forum.babylonjs.com/u/tapanij)\
**Post date:** [April 29, 2025, 6:55am UTC](https://forum.babylonjs.com/t/ar-anchor-creation-fails-with-unbounded-reference-space-on-meta-quest-3/58132/1 "2025-04-29T06:55:53Z")

</div>

In AR with Meta Quest 3, when `referenceSpaceType` is set to `'unbounded'` and the `anchorSystem.addAnchorAtPositionAndRotationAsync` function is used, it throws an error:

**“Error creating anchor: OperationError Failed to execute ‘createAnchor’ on ‘XRFrame’: Anchor creation failed”**

This issue was briefly mentioned back in a 2021 thread:

> [@WebXRAnchorSystem can't add an anchor](https://forum.babylonjs.com/t/webxranchorsystem-cant-add-an-anchor/18638/5):
>
> For some reason adding anchors in unbound space it not supported. change it to local-floor and you get the results you expect: [WEBXR | Babylon.js Playground](https://playground.babylonjs.com/#HYK4HC#9)

The problem still exists. To get anchors working in AR, we have to enable a boundary using `"local-floor"` but that’s not ideal. The boundary is really meant for VR, not AR, and feels like an unnecessary restriction. Anchors are mainly for AR and should work without it.

Here’s a full reproduction playground:  
[WebXR Anchor in AR problem | Babylon.js Playground](https://playground.babylonjs.com/#GG06BQ#215)

Can you trace the bug enough to see whether it’s caused by the WebXR API itself or something in Babylon?

It’s interesting that the error doesn’t happen when using hit test. If the anchor is created with `anchorSystem.addAnchorPointUsingHitTestResultAsync`, it works fine with `'unbounded'`.

Here’s a modified playground using `'unbounded'` and hit test:  
[WebXR measurement tape | Babylon.js Playground](https://playground.babylonjs.com/#GG06BQ#213)

What’s the key difference between `addAnchorAtPositionAndRotationAsync` and `addAnchorPointUsingHitTestResultAsync` that causes this error?

Thank you!

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 29, 2025, 11:19am UTC](https://forum.babylonjs.com/t/ar-anchor-creation-fails-with-unbounded-reference-space-on-meta-quest-3/58132/2 "2025-04-29T11:19:26Z")

</div>

The difference between the two is the way the anchor is created.

A hit test has the option to create an anchor using the data from the hit test itself (with an offset) - [WebXR Anchors Module](https://immersive-web.github.io/anchors/#create-an-anchor-from-hit-test-result)  
The other function uses the native anchor creation function - [WebXR Anchors Module](https://immersive-web.github.io/anchors/#create-an-anchor-from-frame)  
Nowhere in the specs does it mention the reference space type. Both functions should work correctly with any reference space type. And with every reference space.

> [@tapanij](#):
>
> The boundary is really meant for VR, not AR, and feels like an unnecessary restriction

Restriction that is added by the browser vendor, not Babylon.js. Unless I am doing something wrong (which is ALWAYS possible) when adding an anchor (which I will gladly debug), this is a browser limitation.
