Issue with image target and moving forward

So with my project my object seems to be moving around to much. Rotation seems to be updating somewhat fine when i move around but it doesn’t stay put in world space when i move forward or back. My image target component is setup very similar to what’s been posted in previous projects, my only addition is adding a persistence tag so when the image target is lost it stays at its last location.

const imageTargetComponent = () => ({
  schema: {
    name: {type: 'string'},
    persistPosition: {type: 'boolean', default: true},  // Add option to control persistence
  },
  init() {
    const {object3D} = this.el
    const {name} = this.data
    object3D.visible = false
    let targetFound = false
    let lastPosition = null
    let lastRotation = null
    let lastScale = null

    const showImage = ({detail}) => {
      if (name !== detail.name) {
        return
      }

      // Store the position, rotation and scale
      lastPosition = detail.position
      lastRotation = detail.rotation
      lastScale = detail.scale

      // Update object transform
      object3D.position.copy(detail.position)
      object3D.quaternion.copy(detail.rotation)
      object3D.scale.set(detail.scale, detail.scale, detail.scale)
      object3D.visible = true
    }

    const imageFound = (e) => {
      showImage(e)
      targetFound = true
      console.log('found img')
    }

    const imageLost = (e) => {
      // Only hide the object if persistence is disabled or target was never found
      if (!this.data.persistPosition || !targetFound) {
        object3D.visible = false
      } else if (lastPosition && lastRotation && lastScale) {
        // Keep the last known position when target is lost
        object3D.position.copy(lastPosition)
        object3D.quaternion.copy(lastRotation)
        object3D.scale.set(lastScale, lastScale, lastScale)
        object3D.visible = true
      }
    }

    this.el.sceneEl.addEventListener('xrimagefound', imageFound)
    this.el.sceneEl.addEventListener('xrimageupdated', showImage)
    this.el.sceneEl.addEventListener('xrimagelost', imageLost)
  },
})

To note i tested this without my persist tag to see if that was the issue which it is not.

I have attached a video to show you my issue, you can see that rotating seems to working fine but once i move forward the model also moves forward.

I’ve tried keeping disableWorldTracking: true and false.

Current camera

<a-camera position="0 4 10" raycaster="objects: .cantap" cursor="fuse: false; rayOrigin: mouse;"></a-camera>

My image target

Video

Can you share your project with support@8thwall.com as well as provide the name of the project?

(post deleted by author)

I’m encountering the same issue: after the image target is lost, the AR objects remain visible, but they shift position and scale when the phone moves. I want the objects to stay fixed at their last known position and not follow the camera or phone movement. Could you please share how you solved this? I’d really appreciate your help!