cancel
Showing results for 
Search instead for 
Did you mean: 

Discovered anchors are placed at (0,0,0)

InscapeVTS
Honored Guest

Hi there,

I'm trying to use MetaXR anchors for my current project. I previously used Unreal 5.1 with PCVR and I could create, save and reload anchors.

I am now trying to do the same in an Unreal 5.4 standalone project.

My problem is that when I save the anchor, and I reload it with its UUID, it spawns at (0,0,0).

Using the logcat from Android Studio, I found out that there were two errors, one pretty seamingless :

SP:AF:AnchorFramework: getAnchorUuid can't find anchor for handle 4

 And the second one, which I think is the real problem :

[XRCMD][failure] [XR_ERROR_SPACE_COMPONENT_NOT_ENABLED_FB]: xrLocateSpace(*(XrSpace*)space, baseSpace, ToXrTime(GetTimeInSeconds()), &spaceLocation), arvr\projects\integrations\OVRPlugin\Src\Util\CompositorOpenXR.cpp:13440 (arvr\\projects\\integrations\\OVRPlugin\\Src\Util/CompositorOpenXR.h:317

My blueprint is ugly right now, but here is how I discover and save anchors :

Capture d’écran 2024-09-12 113916.pngCapture d’écran 2024-09-12 114001.png

1 ACCEPTED SOLUTION

Accepted Solutions

InscapeVTS
Honored Guest

Well... I found it!

There were two problems in what I made:

- First, the spawned actor needs to have a component "OculusXRSpatialAnchor". This is not clearely written in the documentation, I thought that the MetaXR methods did that automatically.

- Second, the spawned actor after a query "Spawn Oculus Anchor Actor" first instantiate the spawned actor at (0,0,0) and after a few frames moves it at its real position. Again, that is not written in the documentation.

Hope that helps!

View solution in original post

1 REPLY 1

InscapeVTS
Honored Guest

Well... I found it!

There were two problems in what I made:

- First, the spawned actor needs to have a component "OculusXRSpatialAnchor". This is not clearely written in the documentation, I thought that the MetaXR methods did that automatically.

- Second, the spawned actor after a query "Spawn Oculus Anchor Actor" first instantiate the spawned actor at (0,0,0) and after a few frames moves it at its real position. Again, that is not written in the documentation.

Hope that helps!