As our game is now, we have a mechanical problem with our ship. It only moves when a touch begins on the screen, and we want it to move toward where the finger drags around on the screen. Because we get all the standard touch events from iOS, we could copy the same code into ‑touchesMoved:withEvent: and update the ship’s position property there, but there’s a simpler way with Sprite Kit.
Let’s start with a property that keeps track of the touch that we received until the touch ends. Add this class extension to the top of the RCWMyScene.m file above the @implementation definition:
@interface RCWMyScene ()
@property (nonatomic, weak) UITouch *shipTouch;
We’re declaring ...