I'm trying to get the player to move to the direction of the player touch without stopping, or direction of swipe would be better because it seems more natural. However I only can find out how to do so with SKAction.move(by: vector) but the location variable I get from touches.first is a CG point.
I'm not sure what a vector point is so I can't figure out how to convert the touch point to a vector point to make this happen.
Any help would be really appreciated. I'm almost finished with my player movement and excited to move onto whats next
if let location = touches.first?.location(in: self) {
let horizontalAction = SKAction.move(to: location, duration: 1.0)
horizontalAction.timingMode = SKActionTimingMode.easeOut
player?.run(horizontalAction)
touchesBegan()andtouchesMoved()with the same code astouchesEnded()and the bear follows my touch around.