Posts

Post marked as solved
7 Replies
Thank you - this helped me !But (so far) I cannot import more than one rcproject or a rcproject with more than one scene ... but this should be possible in one of the next releases (or betas).
Post marked as solved
7 Replies
Thanks ... tried this - but they are always different 😕 (and never matches)class ViewController: UIViewController, ARSessionDelegate { @IBOutlet weak var arView:RealityKit.ARView! var myAnchor:AR.MainScene! // from AR.rcproject override func viewDidLoad() { super.viewDidLoad() arView.session.delegate = self myAnchor = try? AR.loadMainScene() // from AR.rcproject arView.scene.anchors.append(myAnchor!) } func session(_ session: ARSession, didUpdate anchors: [ARAnchor]) { for anch in anchors { guard let imageAnchor = anch as? ARImageAnchor else { return } if(imageAnchor.isTracked) { if(myAnchor.anchorIdentifier == imageAnchor.identifier) { debugPrint("GOT IT !") // <-- THIS NEVER HAPPENS } myAnchor?.isEnabled = true // works } else { myAnchor?.isEnabled = false // also works } } } }
Post marked as solved
7 Replies
Thank you - that helped me (so far)BUT:if I have more than one anchors (appended to ARView.session.anchors), how can I distinguish which updated ARAnchor( ARImageAnchor) belongs to my added anchors ?In a different question (ARKit) you mentioned using the name of the referenceImage. To get this value from the (updated) ARImageAnchor ist pretty easy ... but how get the correspondig value from the (imported) RealityKit-scene (.reality file)?Best regards