Skip to content

Conversation

@francisjervis
Copy link

Adds .identifier property to Annotation and stores it as the .name property of the associated SCNNode, to facilitate handling user interactions with callout nodes.

@francisjervis
Copy link
Author

Sample code for retrieving this in the AR VC:

override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {

            if let p = touches.first?.location(in: self.cameraView) {

                let q = self.cameraView.hitTest(p, options: nil)

                if q.count > 0 {
                    let t = q[0]
                    let n = t.node
                    if let numberTapped = n.name {

//                      respond to the interaction

                    }
                    

                }

            }

        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant