ARKit flash effect on Image Texture

I´m trying to develop a simple Augmented Reality experience overlaying an image over a tracked image. I'm using `ARImageTrackingConfiguration` and inside the `renderer` method I have the following:



let referenceImage = imageAnchor.referenceImage;

let image = UIImage(named: "art.scnassets/2.jpg")

let planeNode = SCNNode(geometry: SCNPlane(width: referenceImage.physicalSize.width,height: referenceImage.physicalSize.height))

planeNode.geometry?.firstMaterial?.diffuse.contents = image



planeNode.eulerAngles.x = -.pi / 2

// Add the plane visualization to the scene.

node.addChildNode(planeNode);





The tracking is performing well but the overlay image is suffering the flash effect you see on this [video][1]



How could I avoid this effect?





[1]: https://cdn.shopify.com/s/files/1/0119/2660/1786/files/ScreenRecording_12-06-2018_09-33-19.MP4?13850024475923354131

Post not yet marked as solved Up vote post of enolcasielles Down vote post of enolcasielles
1.2k views

Replies

It looks like you are replacing the plane for this tracked image over and over. Check to make sure you are only adding the SCNPlane into your scene one time.

Have you fixed this error yet? please tell me how to fix it