Skip to main content
New Participant
October 3, 2025
Question

QR code tracking problems, object doesn't spawn at scanned qr code everytime.

I am trying to create an app with qr code tracking, at first it went perfectly well, just for the first time only, object was spawned at qr code object where I wanted.

But the second, third and next time and on and on. Whenever I scan qr code, the object keep be spawned at different places. I keep changing places where I start my app, at first I thought that was the reason for this problem, but even if I go back to the same place that it was spawned at the right place, this time the object was spawned where I didn't want instead.

I have enabled 

  • Anchor Support
  • Scene Support
  • Experimental features
  • Permission Requests On Startup >> Scene
  • QR Code tracking

, which are required for QR code tracking function. So I really don't know why this keep happening.

I have tried "save my perference" and "not save my perference" for spatial data request when the app is starting. And the results are the same. I have no more idea to try.

Please help me, Thank you.

5 replies

jtriveri
Honored Contributor
October 3, 2025

Could you share the script that reads the QR code and spawns the object? 

New Participant
October 6, 2025

There's just this, the rest is SetActive() in my project.

New Participant
October 10, 2025

I used meta botton to reset position before I scan qr code after I re-enter the application, and the objects spawn at the place I want almost everytime.

Meta Employee
October 3, 2025

Hello there PeterRatchetBoy!

I understand you're having trouble implementing QR Code tracking in your app.

Since you mentioned the object spawned in the right place the first time, but not on later attempts, I'd suggest that you check your anchor persistence and make sure that you are saving the anchor or spatial node associated with the QR code and reloading it on subsequent app launches. If you're still having the issue, you could also try a minimal project with just QR code tracking and anchor persistence to try isolating the issue. 

Additionally, try to make sure your app’s world/session origin is set consistently, especially after relaunching or resuming the app. If you're doing this on a Quest, you can “relocalize” (i.e. restoring the app’s spatial context so objects appear in the same place across sessions) to a previously saved spatial map. I'll attach some of our documentation below that hopefully should help point you in the right direction if you haven't seen them yet. 

Hopefully you found some of this helpful, and if not please feel free to let me know and we can investigate further!

Track QR Codes in MR Utility Kit
Spatial Anchors

-G

New Participant
October 6, 2025

Thank you for your answering.

I will try to implement the script as you say.