Hello i am trying to set an object with 0 mass. my code looks like this
btScalar characterWidth1 =10.75;
btConvexShape* capsule1 = new btCapsuleShape(characterWidth1,characterHeight1);
myObject.mtrans2.setOrigin( btVector3( BtOgre::Convert::toBullet( Ogre::Vector3( 200,100,200) + Ogre::Vector3(0,60,0) ) ) );
myMotionState1 = new MyMotionState(mtrans2, torsoNode);
body5 = new btRigidBody(rbInfo1);
//body5->setAngularVelocity( btVector3( 0.0f, 0.0f, 0.0f ) );
dynamicsWorld2->addRigidBody( body5 );
It has very strange results. My only solution was to add this object to a new dynamics world and set the gravity to 0, but this is undesirable. This object is the turret on a tank in my game. I also used this code to have its turret always above the bottom of the tank.
torsoTrans.setOrigin( btVector3(BtOgre::Convert::toBullet( position + Ogre::Vector3(0,60,0) )) );
That code is updated every frame. I needed to have its gravity acceleration at 0 or mass at zero so that the turret is always sitting on top of the tank. The turret has shaky results, it doesn't look very good. Is there any other.
So these are two questions that are connected. any help with either thanks.