static bodies don't appear?

JohnBoyManbullet

19-10-2011 05:18:28

Hello. I am trying to set up a static body like this. When i set the mass to zero nothing appears on my ogre window. When the mass is set to anything else it will appear. I don't understand. Is there a better way to do static bodies, thanks.


btTransform startTransform6;
startTransform6.setIdentity();
//Ogre::Vector3( Ogre::Vector3(mW[k].x,0,mW[k].z) + Ogre::Vector3(0 , buildsiteWall[k].height[0]+100 , 0) ))BtOgre::Convert::toBullet(Ogre::Vector3(mW[0].x,0,mW[0].z) + Ogre::Vector3(0 , buildsiteWall[0].height[0]+100 , 0)))
startTransform6.setOrigin( btVector3(btVector3(mW[0].x,0,mW[0].z) + btVector3(0 , buildsiteWall[0].height[0] + 10 , 0) ));
btScalar mass6(0);
// colShape->setPosition(btTransform::getIdentity(), min, max);
//rigidbody is dynamic if and only if mass is non zero, otherwise static
// bool isDynamic1 = (mass6 != 0.f);

btVector3 localInertia8(0,0,0);
// if (isDynamic1)
//colShape->calculateLocalInertia( mass6, localInertia8 );

btScalar mass1( 0.0 );
// bool isDynamic1 = ( mass1 != 0.f );

// btVector3 localInertia8( 0,0,0 );
// if ( isDynamic1 )
colShape->calculateLocalInertia( mass1,localInertia8 );

myMotionState8 = new MyMotionState(startTransform6,wall1[0]);
btRigidBody::btRigidBodyConstructionInfo rbInfo6(mass1,myMotionState8,colShape,localInertia8);
body6[0] = new btRigidBody(rbInfo6);
body6[0]->setAngularFactor(.0f);
body6[0]->setFriction(0.8f);

body6[0]->setActivationState(DISABLE_DEACTIVATION);