I am trying to make my node start at the same position that I tap in a game but I can't figure it out
here is my code for where to position the node. I get my location from the tap gesture recognizer by:
let myLocation = recognizer.location(in: self.view)
Then I get the x and y position into a float value:
let myx = Float(myLocation.x * 0.01)
let myy = Float(myLocation.y * 0.01)
Then I set the nodes position(the camera is set at 30)
shapeNode.position = SCNVector3(x:myx, y:myy, z: 30.0)
The position is off by a lot and I can't figure out why...
Someone please help