Image tracking initialization issue

Hi there.

i experience a problem while tracking within the image tracking framework (using PlayCanvas).

i basically use the events:

this.app.on('xr:imagefound', showImage, {});
this.app.on('xr:imagelost', hideImage, {});

those events handles some ui elements to guide the user.

const showImage = (detail) => {
    if(!arPlaced)
    {
        arPlaced = true; 
        _uiController.uiSwitch("ar_mask", false);
        _uiController.uiSwitch("tutorialOverlay", true);
        // enable ar placement screen
        _uiController.tutorialOverlay("arPlacement", true);
        
    } 
    _uiController.debugText.element.text = "image visible";
}

const hideImage = (detail) => {
    _uiController.debugText.element.text = "lost image";
}

Now the problem: our customer told me, that sometimes the image is detected but the 3d object isnt visible / enabled / active. (I’m debuging on screen with the debugText element if the imageTarget is recognized). I cant figure out, why the 3d object the framework should enable isnt directly visible if showImage is called (which basically indicates, that the framework recognized the imageTarget correctly)

Is there a fix i could do? Or should i use another eventlistener, to handle the ui if the 3d object, which should be placed is active? can i check for this?

Thanks for your inputs!

Edit: Is there a eventlistener i could use to call the showimage function only if the 3d object is visible? This would help to prevent, that the ui is moving forward, and no 3d object is visible.

Have you attached the namedimagetarget script to the object? If it’s a 3D model, what’s the size (MB)?