Newton problem when reloading level
Posted: Thu Sep 07, 2006 7:31 pm
Hi,
I have a big problem with Newton ...
When I start my game, my object falls on the floor directly.
But when I stop my game(in order to restart the level) my object doesn't fall directly on the floor.
With 1 restart, I must shoot on it 1 second and he falls.
With 2 restart 2 secconds, with 3 restarts 4 seconds ...
I use this functions to release Newton:
NewtonDestroyAllBodies(nWorld);
// release the collision tree
NewtonReleaseCollision(nWorld, g_newtonmap);
for (int i=0; i<numNewtonObject; i++)
NewtonReleaseCollision(nWorld, newtonObject->collision);
// destory the newton world object
NewtonDestroy(nWorld);
Can you help me please ???
I have a big problem with Newton ...
When I start my game, my object falls on the floor directly.
But when I stop my game(in order to restart the level) my object doesn't fall directly on the floor.
With 1 restart, I must shoot on it 1 second and he falls.
With 2 restart 2 secconds, with 3 restarts 4 seconds ...
I use this functions to release Newton:
NewtonDestroyAllBodies(nWorld);
// release the collision tree
NewtonReleaseCollision(nWorld, g_newtonmap);
for (int i=0; i<numNewtonObject; i++)
NewtonReleaseCollision(nWorld, newtonObject->collision);
// destory the newton world object
NewtonDestroy(nWorld);
Can you help me please ???