I\'m trying to make a game in which I have some SKSpriteNodes and the User can hit them with finger movement, I\'m using apple\'s new Sprite Kit.
To
After searching and making a lot of experiments, I finally have an answer!
The first step in the solution was provided by AyatollahAndy - finding the point of impact:
SKNode *node = [self nodeAtPoint:location];
this line gets the node that we hit in the specified location, if it returns nil we didn't hit anything.
secondly- we want to "Hit" the object, therefor we need to ApplyImpulse:
[node.physicsBody applyImpulse:CGVectorMake(thrustV.x, thrustV.y) atPoint:location];
Here you can see I applied the impulse with some vector that I created at the point of impact, That's it - pretty straight forward, I hope this will help others.
Sharing is caring, Thanks for taking the time to read my post.