09-12-2024 02:42 AM
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 :
Solved! Go to Solution.
09-13-2024 02:33 AM
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!
09-13-2024 02:33 AM
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!