Post

Replies

Boosts

Views

Activity

Comment on Create image objects repeatedly after AR tracking/detection results
The code snippet is as follows:  updateQueue.async {        ......       // Dispaly image       DispatchQueue.main.async {         let imageView = UIImageView(image: UIImage(named: "image3"))         imageView.contentMode = .scaleAspectFit         imageView.backgroundColor = UIColor.clear         imageView.center = CGPoint(x: 720.0/2, y: 1280.0/6)         imageView.bounds.size = CGSize(width: 720.0, height: 1280.0)         plane.firstMaterial?.diffuse.contents = imageView       }     }
Aug ’22
Comment on Create image objects repeatedly after AR tracking/detection results
Thanks for your answer! I added the texture to the example (https://developer.apple.com/documentation/arkit/content_anchors/detecting_images_in_an_ar_experience) you provided to display the tracking or detection images. After the tracking or detection is completed, re-track again Or detected, checked the layer, the image to be displayed was created repeatedly, the layer is _SCNSnapshotWindow. Why is this? Can the AR team answer this question? Thanks!
Aug ’22