I think the code proposed is missing an else; in case the user moves outside the pad (where the node does not start with “controller_”), the player will continue to move continuously
func touchDown(atPoint pos : CGPoint) {
let nodeAtPoint = atPoint(pos)
if let touchedNode = nodeAtPoint as? SKSpriteNode {
if touchedNode.name?.starts(with: “controller_”) == true {
let direction = touchedNode.name?.replacingOccurrences(of: “controller_”, with: “”) player?.move(Direction(rawValue: direction ?? “stop”)!)
}
else {
player?.move(Direction.stop)
*** }***
}
}