Reputation: 637
In my SpriteKit game i move several sprites using [sprite.physicsBody applyImpulse:vector];
but at a specific point i the game i want them to stop.
I already tried to apply the exact opposite impulse.. but that did not worked very well.
Thanks
Upvotes: 1
Views: 535
Reputation:
You can directly set a physicsBody's velocity via the velocity property. Stop a body by setting it's velocity to (0,0):
sprite.physicsBody.velocity = CGVectorMake(0,0);
Upvotes: 1