bullet doesn't show objects even they are active
Posted: Sat Mar 30, 2013 11:39 am
I created a two leg robot in blender and imported it to bullet. Now when I run my program, after few seconds the left leg will be disappeared. I fought that bullet deactivate objects
if they have not move. (I don't have any gravity in my scene).
So I write this code
I see this ouput
Now they are all active. But after few seconds, they disappeared. Any Idea about this?
if they have not move. (I don't have any gravity in my scene).
So I write this code
Code: Select all
for(int i=0; i<debugger->getDynamicsWorld()->getNumCollisionObjects();i++) {
if( !debugger->getDynamicsWorld()->getCollisionObjectArray()[i]->isActive() )
std::cout << "obj " << i << " is inactive" << std::endl;
objects 1-4 are for left foot and 5-9 for right foot. So I activate them with this code in initphysics() function:obj 1 is inactive
obj 2 is inactive
obj 3 is inactive
obj 4 is inactive
Code: Select all
for(int i=0;i<m_dynamicsWorld->getNumCollisionObjects();i++)
m_dynamicsWorld->getCollisionObjectArray()[i]->setActivationState(DISABLE_DEACTIVATION);