|
You have to update the object's broadphase proxy. The broadphase proxies represent the bounding boxes of all your objects and are arranged in a tree structure. Any time that you move a static object, you have to update the aabb min/max in the broadphase, which requires an update to the actual tree structure.
Untested code:
btVector3 aabbmin, aabbmax; yourObject->getCollisionShape()->getAabb(yourObject->getWorldTransform(), aabbmin, aabbmax); // extracts the object's min/max axis aligned bounding box world coordinates yourBulletWorld->getBroadphase()->setAabb(yourObject->getBroadphaseHandle(), aabbmin, aabbmax, 0); // sets the proxy's aabb and updates the tree
|