So I'm trying to learn SpriteKit while building what I think is a simple puzzle game. I have a 5x5 grid of SKSpriteNodes of different colors. What I want is to be able to touch one, and move my finger horizontally or vertically and detect all the nodes that my finger is touching, like if I was "selecting" them.
I tried to do something like this, but it crashes the app:
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInNode:self];
SKSpriteNode *node = [self nodeAtPoint:location];
NSLog(@"Dragged over: %@", node);
}
Is there something like a "touchEnter" / "touchLeave" kinda event that I'm missing? Sorry, I don't even know what I don't know.