Browse Source

Remove setting certain RigidBody boolean flags when UpdateMass() readds the body to world, to avoid introducing potential new bugs.

Lasse Öörni 8 years ago
parent
commit
6af97c59b6
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Source/Urho3D/Physics/RigidBody.cpp

+ 1 - 3
Source/Urho3D/Physics/RigidBody.cpp

@@ -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;
     }
 }