this is my first post and first of all i want to thank all the bullet staff for such a great tool and all the forum for the support.
i've installed bullet 2.76 SDK because i wanted it to manage physics for a graphical application that uses ogre3d rendering engine
(by now it's just a cube....but it works
What i dont understand is that bullet has to call each tick/frame dynamicsWorld->stepSilmulation() , but ogre has its own loop:
Code: Select all
int main(int argc, char *argv[])
{
// Create application object
CubeApplication app;
try {
app.go();
} catch( Ogre::Exception& e ) {
std::cerr << "An exception has occured: " <<
e.getFullDescription().c_str() << std::endl;
}
return 0;
}So where should i call stepSimulation() ?
i read that btMotionState is the connection between bullet and ogre, overriding getWorldTransform() and setWorldTransform(),
but where i have to call these ?
I though about making an Ogre FrameListener that each frame calls stepSimulation() and MotionState::getWorldTransform() and MotionState::setWorldTransform().
Am i wrong ? (i bet i am)
my goal by now is to have the motion of a cube(ogre mesh) driven by bullet dynamics
i would be very glad if you could point me in the right direction.