Changes to spatial anchor behavior between OS 1.2 and 1.3 in Unity?

Our app has an anchoring system that defaults to the starting headpose of a device. In OS 1.2, if the space was pre-mapped, our default anchor in Unity would magically snap to the space without any special changes in our design (it was getting the "right" default heapdpose position relative to the real world based on ML's location in the mapped space). That was super-convenient, because revisiting the project and physical space would automatically be re-aligned. Now, in with OS 1.3, the anchor snaps to the default head pose of the user in Unity (like it did before the Spaces or AR cloud API was introduced) - the premapped space is still recognized on device but has no impact to Unity's starting pose in relation to the mapped space.

Nothing in our app design has changed; we just updated the OS on the ML device. What changed in how ML communicates the starting head pose location to Unity relative to the mapped space, and how do we get back to that prior behavior?

Thank you.

To make sure I understand, you noticed this behaviour only after updating your OS? Did you update your project's SDK? Are you using the Spatial Anchor API or are you referring to the Origin in your Application?

Hi Krystian, so what we are doing is saving three anchor points in our Unity app and using the Unity ML SDK to re-snap our in-app origin to the real world based on the spaces API, by finding the matching trio. So, it seems that relationship broke after the update. We're still investigating to determine how the API call is failing. One possible explanation is that in our implementation, at the time, we had to set a lifespan on the anchor points to some point in time way out in the future, because marking them as persistent was failing; we think that was an API bug in that release.

The app was built using SDK 1.3.latest. Only the OS on the ML was updated from 1.2.latest to 1.3.1.

The call we are making to obtain the location match is:
MLResult mlResult = MLAnchors.GetLocalizationInfo(out MLAnchors.LocalizationInfo info);

So, it seems either the way the Spaces API gets called, or how it determines the match has changed somehow on the ML OS side between 1.2 and 1.3 (?).

Thanks for your help!

Thank you for the explanation. Were you able to rescan or remap the space with the spaces app after upgrading OS versions?

I have tried re-mapping and re-saving the existing map, but will also try creating a fresh space. Drew is also doing some debugging later this week and we'll keep you posted on our findings. Thank you.

@cstavros A small tangent but OS version 1.4.1 we released major improvements to our Spatial Anchor system so unless you are limited to 1.3 you may have a more robust experience upgrading to an OS from then or later.

1 Like