Currently, I'm trying to apply a force to an SCNNode using information from a swipe on the screen. Ideally, the user swipes up on the screen, (like Pokemon Go
) to apply force on a node.
However, whenever I apply the force vector, it only works depending on the camera direction. Sometimes it works with the right direction, and sometimes it causes the object to go in the opposite direction.
How do I consistently apply a force so that the node to go in the direction of my swipe, regardless of camera direction?