Topic: Stop physics

How do you pause/stop physics?
I'm currently putting all object mass to zero, but it would be cool to have a function in MScene for that. It's useful when debugging.

Last edited by 255 (2013-10-08 19:01:34)

Re: Stop physics

the physics is runned by MGame::update :
https://code.google.com/p/maratis/sourc … /MGame.cpp

you can create your custom MGame class and change the update function to run "scene->updatePhysics();" with a condition condition.

Re: Stop physics

Yes but I would have to copy all the code from the original MGame::update instead of just doing

MGame::update();

in my derived class.
And just do

scene->stopPhysics();

when I need it.

Last edited by 255 (2013-10-09 21:39:50)