Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
- guard let touch = touches.first else { return }
- let touchPoint = touch.location(in: yourARsceneOUTLET)
- let results = yourARsceneOUTLET.hitTest(touchPoint, types: [.featurePoint])
- guard let result = results.last else { return}
- let hitTransform = SCNMatrix4(result.worldTransform)
- let position = SCNVector3Make(hitTransform.m41, hitTransform.m42, hitTransform.m43)
- addModel(position: position) // the function that has the Alert with textField
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement