[solved]callback doesn't work after reseting bodies

pawka

04-06-2008 01:52:49

Hi. I've got strange situation with my ogreNewt:
in OgreNewtonFramelistener I added method bool frameEnded(...)


bool OgreNewtonFrameListener::frameEnded(const FrameEvent &evt)
{

DWORD actTicks = GetTickCount();
float time = (float)(actTicks - OgreNewtonFrameListener::startTime) / 1000;
if (time >= 10)
{
resetStartTime();
OgreNewtonApplication::resetCreatures();
}
updateStats();
return true;
}


so after 10 seconds time starts new counting and I reset all my "creatures" (position and orientation is set to start values). It work fine until "creatures" are moving (torque is working). If their aren't moving in moment

if (time >= 10)
{
resetStartTime();
OgreNewtonApplication::resetCreatures();
}

the callback isn't working in whole comming 10s period unless I make manually (f.e. i hit that creature using other object) creature to move.
I you want some more code details I will write (but I don't know what you need).
Thanks for any help.
Sorry for my english

p.s. are there any flags on objects, that show callback activity (use or not)??

pawka

04-06-2008 22:58:30

if anyone would be interested in solving that problem I used method unfreeze and it works:)

St0rM3r

05-06-2008 01:46:03

Where do you use the method unfreeze ?

pawka

05-06-2008 22:02:37

in body's methods:)