objective c - How to stop a sprites physicsBody from moving? -
in spritekit game move several sprites using [sprite.physicsbody applyimpulse:vector];
@ specific point game want them stop. tried apply exact opposite impulse.. did not worked well.
thanks
you can directly set physicsbody's velocity via velocity property. stop body setting it's velocity (0,0):
sprite.physicsbody.velocity = cgvectormake(0,0);
Comments
Post a Comment