masterfalcon
08-01-2008 07:38:46
Hey everyone,
I'm just getting started with Bullet and the Ogre integration and I've run in to a peculiar situation. The debug visualization and Ogre's bounding box visualization show two totally different size boxes. Ogre's looks more accurate, while Bullet's is roughly twice the size of the object. Here's my code for creating the object.
As a side note, I have two of these tanks that are both controlled and I can't seem to get any collision response from anything but static objects. Am I missing something? Do I need to create a collision callback?
Thanks so much in advance,
Dave
I'm just getting started with Bullet and the Ogre integration and I've run in to a peculiar situation. The debug visualization and Ogre's bounding box visualization show two totally different size boxes. Ogre's looks more accurate, while Bullet's is roughly twice the size of the object. Here's my code for creating the object.
tank1Node->showBoundingBox(true);
OgreBulletCollisions::BoxCollisionShape *tank0CubeShape = new OgreBulletCollisions::BoxCollisionShape(tank0Entity->getBoundingBox().getHalfSize());
OgreBulletDynamics::RigidBody *tank0CubeRigid = new OgreBulletDynamics::RigidBody("tank0CubeRigid", mWorld);
tank0CubeRigid->setShape(tank0Node, tank0CubeShape, 0.3, 0.8, 1.0, tank0Node->getPosition(), tank0Node->getOrientation());
tank0CubeRigid->getBulletRigidBody()->setCollisionFlags(tank0CubeRigid->getBulletRigidBody()->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT);
tank0CubeRigid->disableDeactivation();
As a side note, I have two of these tanks that are both controlled and I can't seem to get any collision response from anything but static objects. Am I missing something? Do I need to create a collision callback?
Thanks so much in advance,
Dave