Code: Select all
btTransform transform(btQuaternion::getIdentity(),btVector3(visible_position.x, visible_position.y, visible_position.z));
collision_object->setWorldTransform(transform);
//collision_object->activate(); //one of many things I tried
I tried removing the collision objects and creating new ones and adding them to the world everytime they move. However this is too slow as I have hundreds of shapes that are continuously moving and it kills my framerate.
Is there a fast way to move a btCollisionObject?