|
|
@@ -816,14 +816,12 @@ void RigidBody::UpdateMass()
|
|
|
(*i)->ApplyFrames();
|
|
|
}
|
|
|
|
|
|
- // Readd body to world if collision shape was changed (issue #2064)
|
|
|
+ // Readd body to world to reset Bullet collision cache if collision shape was changed (issue #2064)
|
|
|
if (inWorld_ && body_->getCollisionShape() != oldCollisionShape && physicsWorld_)
|
|
|
{
|
|
|
btDiscreteDynamicsWorld* world = physicsWorld_->GetWorld();
|
|
|
world->removeRigidBody(body_.Get());
|
|
|
world->addRigidBody(body_.Get(), (short)collisionLayer_, (short)collisionMask_);
|
|
|
- readdBody_ = false;
|
|
|
- hasSimulated_ = false;
|
|
|
}
|
|
|
}
|
|
|
|