Code: Select all
//in your source code add
btBulletWorldImporter* fileLoader = new btBulletWorldImporter(m_dynamicsWorld);
//optionally enable the verbose mode to provide debugging information during file loading (a lot of data is generated, so this option is very slow)
//fileLoader->setVerboseMode(true);
fileLoader->loadFile("testFile.bullet");
So fileloader will put my model from testfile into dynamicsWorld directly.
But how will i acces that model that I just put into dynamics world?
This doesn't work:
dynamicsWorld->m_collisionObjects.at(0)->getWorldTransform().getOrigin().getX();
it says I don't have acces to m_collisionObjects.So how do I get my x,y,z from the model that I just loaded into dynamicsworld?