Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / command to temporarily pause all box2d physics

Author
Message
ICERGB
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 7th Nov 2012 06:48
Is there a command I could use to temporarily pause all sprites which are using physics? tier1

To pull up a pause screen, pause the physics, so I can restart them again so that they still have the same forces applied?

Thanks!
Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 7th Nov 2012 09:01
I'll need this too very soon. I haven't tried it myself yet, but I believe StepPhysics(0) does the trick...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Nov 2012 09:12
Yes Funnell7 is right, it manually moves the simulation forward by the amount you set in the brackets and stops it from being updated during the update / sync command so if you set it to zero it effectively pauses the simulation.


this.mess = abs(sin(times#))
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Nov 2012 11:47
nice Added to my list of ridiculously useful functions I never knew existed.

Login to post a reply

Server time is: 2024-05-08 00:25:26
Your offset time is: 2024-05-08 00:25:26