Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I slow down or stop physics in SpriteKit?

It seems to me that a framework that aims for simplicity would have that method so, and not to remove every node from the physics accounting like I'm doing now:

[self enumerateChildNodesWithName:@"live" usingBlock:^(SKNode *node, BOOL *stop){
        [node removeFromParent];
}];

I'm sorry if this is a noob question, I've just started working with SpriteKit. Thanks!

like image 585
raej2010 Avatar asked Dec 02 '25 08:12

raej2010


1 Answers

It has "that method". If you look in the SKPhysicsWorld reference you'll find the speed property. Speed = 0 means paused.

like image 74
LearnCocos2D Avatar answered Dec 06 '25 20:12

LearnCocos2D



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!