.bullet import question

Post Reply
noatom
Posts: 12
Joined: Thu Nov 08, 2012 2:03 pm

.bullet import question

Post 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?
MaxDZ8
Posts: 149
Joined: Fri Jun 24, 2011 8:53 am

Re: .bullet import question

Post by MaxDZ8 »

Read the manual. You can pull out this exact variable by calling btCollisionWorld::getCollisionObjectArray().
Post Reply