Post not yet marked as solved
Post marked as unsolved with 1 replies, 262 views
Hello,
I tried to implement a game in arkit, when user tap the screen, the bullet will be fired from the touched position.
I know how to get 2D position on the screen as below
void HandleTapGesture(UITapGestureRecognizer sender)
{
SCNView areaPanned = sender.View as SCNView;
CGPoint point = sender.LocationInView(areaPanned);
but I don't know how to transfer this position into the world position.
Then I can use it in below scenario
let bullet = SCNNode(geometry: SCNSphere(radius: 0.08))
bullet.position = ?
That position type is
open var position: SCNVector3
Can anyone share any opinion? Many thanks.