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 / is there a way to stop physics ?

Author
Message
haliop_New
User Banned
Posted: 15th Jan 2015 12:44
i have created a small options menu for my app and i want when im inside it to stop all physics , is there a command of doing so ? i searched the physics Section in the document but didnot find anything....

i can obviusly create a function to calculate all velocities of all objects and just keep them in place and add the velocities after i quit the settings menu..

any ideas ?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 15th Jan 2015 12:53
stepphysics(0)

V2 T1 (Mostly)
Uzmadesign
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Jan 2015 13:20
CJB is right, just use StepPhysics(0) before every sync in your loop. I normally have something like:

if PhysicsOn=0
StepPhysics(0)
endif
Sync()


Using AppGameKit V2 Tier 1
haliop_New
User Banned
Posted: 16th Jan 2015 12:59
cool thanks i tried it but did not know it should be inside the loop
thank you.

Login to post a reply

Server time is: 2024-05-06 07:42:27
Your offset time is: 2024-05-06 07:42:27