////////////Template code //////////// Chunk 4 GameScene.m //Add to touchesBegan [self trackPaddlesToMotivatingTouches]; - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [self trackPaddlesToMotivatingTouches]; } - (void)trackPaddlesToMotivatingTouches { id a = @[@{@"node": [self childNodeWithName:@"left_paddle"], @"touch": self.leftPaddleMotivatingTouch ?: [NSNull null]}, @{@"node": [self childNodeWithName:@"right_paddle"], @"touch": self.rightPaddleMotivatingTouch ?: [NSNull null]}]; for (NSDictionary *o in a) { SKNode *node = o[@"node"]; UITouch *touch = o[@"touch"]; if ([[NSNull null] isEqual:touch]) continue; CGFloat yPos = [touch locationInNode:self].y; NSTimeInterval duration = ABS(yPos - node.position.y) / kTrackPixelsPerSecond; SKAction *moveAction = [SKAction moveToY:yPos duration:duration]; [node runAction:moveAction withKey:@"moving!"]; } }