Object's position

inakin
Posts: 9
Joined: Wed Jan 16, 2008 6:36 pm

Object's position

Post by inakin »

Hello,

I would like how I can know the objects positions in the simulation. I supposed that the way is using the m_origin atribute in the btTransform class but I don't really know how works it. I only want to know what is the best way to have some analitical knowledge about the development of the simulation not only graphical knowledge.


Thanks.
pico
Posts: 229
Joined: Sun Sep 30, 2007 7:58 am

Re: Object's position

Post by pico »

Hi,

i think this is ok. I do it like this:

btDefaultMotionState* myMotionState = (btDefaultMotionState*)body->getMotionState();
btVector3 p=myMotionState->m_graphicsWorldTrans.getOrigin();