Page 1 of 1

.bullet import question

Posted: Sun Nov 11, 2012 4:53 pm
by noatom
Let's say I have this:

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?

Re: .bullet import question

Posted: Tue Nov 13, 2012 8:19 am
by MaxDZ8
Read the manual. You can pull out this exact variable by calling btCollisionWorld::getCollisionObjectArray().