I am scaling a child shape of a compound object. The scaling seems fine in debug draw but the collisions does not take place. The body should be pushed out from a nearby wall when the child gets enlarged, this does not happen. I have tried scaling the shape without a compound object and that works fine, the body gets pushed out. Here's my code for scaling the object:
Code: Select all
if (mBody->getCollisionShape()->isCompound()){
btCompoundShape * comp = (btCompoundShape *)mBody->getCollisionShape();
btCollisionShape * child = comp->getChildShape(0);
if(child!=0){
child->setLocalScaling(btVector3(2.5,2.5,1));
}
((btCompoundShape *)mBody->getCollisionShape())->recalculateLocalAabb();
}