Issue with Anchoring A-Frame Entities to Image Targets

I’m currently working on an image target project using A-Frame. I have two entities to display when the image target is found. I’m facing an issue with one entity that doesn’t stay anchored/static to the image target. Instead, it moves around a little when I look around with the camera. The other entity works fine and is stationary. I’ve enabled world tracking with xrweb.

I’ve tried these options

  • setting fixed position and rotation values for the entity, but it still moves with the camera.
  • setting up the image target again
  • to check: removed image target detection () and displayed the entity directly in the scene, it stays stationary as expected.

Any help or guidance would be greatly appreciated. Thanks!

Hi! Could you share your project with the support workspace so we can take a look?

Hi! I checked out your project and didn’t encounter the issue on my personal device, but I believe I understand what you’re referring to:

Looking at the model in your project, here are some key points to consider:

  1. The model has an extremely high triangle count. For a non-animated graphic like this, I highly recommend simplifying the geometry. Specifically, you can map your graphic as a texture onto a quad. This change would reduce the polygon count from 2.2 million to just two polygons.
  2. The model is a massive 77.97 MB. While this might be manageable in Unity, it’s excessive for web-based applications. Ideally, you should aim for model sizes around 4-5 MB for web usage. I suggest running your models through the optimization tool at gltf.report and exporting them with Draco compression for significantly smaller file sizes.
  3. The model isn’t positioned at the origin. Image targets assume the content is centered at the origin (0, 0, 0). Any deviation will cause the model to appear offset. Ensure that your model is properly aligned to avoid this issue. Same thing goes for scale. Ideally you want the scale of your entity to be 1, 1, 1. I would adjust the scale in your modeling program.

For more details, you can refer to the following resources:

Once you take a pass through these items I’d be happy to take another look if you’re still encountering issues,.