Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
FabioWeltenbauer's avatar
2 years ago

Unreal Spacial Anchor Sample not working as expected

Hello,


I am trying to get the unreal spacial anchor sample to work (https://github.com/oculus-samples/Unreal-SpatialAnchorsSample). But there happens to be a strange bug, which always sets my created marker on the position 0,0,0 in the level right after I created one and not on the position where it should appear. (see Image below)

 

Everything else seems to work fine, I can save and load the markers, but they always appear at the same position. I already checked if the position gets set correctly, when spawning the spatial model, which is the case but after the Blueprint Node "Oculus XR Async Create Spatial Anchor" (which succeeds) the position reset happens and I also cant set it back again.


Has anyone any Idea why this happens? Does this only happen to me?

I am using Unreal Engine 5.3.2 and have the Meta XR Plugin v60 installed.
I am also getting the following errors in the console:

LogOVRPlugin: Error: [XRCMD][failure] [XR_ERROR_HANDLE_INVALID]: xrLocateSpace(*(XrSpace*)space, baseSpace, ToXrTime(GetTimeInSeconds()), &spaceLocation), arvr\projects\integrations\OVRPlugin\Src\Util\CompositorOpenXR.cpp:11833 (arvr\projects\integrations\OVRPlugin\Src\Util\CompositorOpenXR.h:302)
LogOVRPlugin: Error: [XRCMD][failure] [XR_ERROR_HANDLE_INVALID]: xrLocateSpace(*(XrSpace*)space, baseSpace, ToXrTime(GetTimeInSeconds()), &spaceLocation), arvr\projects\integrations\OVRPlugin\Src\Util\CompositorOpenXR.cpp:11833 (arvr\projects\integrations\OVRPlugin\Src\Util\CompositorOpenXR.h:302)


Thanks in advance for your help

 

4 Replies

Replies have been turned off for this discussion
  • it seems the reference of model spawn positioner is setting the transform value to 0,0,0. see if it references the proper actor. I think it should reference the right controller of the VR Pawn.

    • dario.maciel's avatar
      dario.maciel
      Start Member

      try packaging your game. are you using vr preview or somehting?

    • FabioWeltenbauer's avatar
      FabioWeltenbauer
      Explorer

      Thank you for your response,

      Thats what my first idea was too, but weirdly the transform of the spawn positioner seems to be correct. I already tried printing out the transform value, which shows me correct values and when I only execute the SpawnActor method, without the next node with the "Oculus XR Async Create Spatial Anchor" method It spawns the Actor on the correct location. But then I can't really use them as Spacial Anchors, because it wont save or load them.