pawka
04-06-2008 01:52:49
Hi. I've got strange situation with my ogreNewt:
in OgreNewtonFramelistener I added method bool frameEnded(...)
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
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)??
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)??