Procházet zdrojové kódy

Bullet rigidbody's inertia tensor does not depend on position, so no need to recalculate it if rigidbody position only is forced to a new value.

Lasse Öörni před 12 roky
rodič
revize
6dd168db5d
1 změnil soubory, kde provedl 0 přidání a 1 odebrání
  1. 0 1
      Source/Engine/Physics/RigidBody.cpp

+ 0 - 1
Source/Engine/Physics/RigidBody.cpp

@@ -238,7 +238,6 @@ void RigidBody::SetPosition(Vector3 position)
         btTransform interpTrans = body_->getInterpolationWorldTransform();
         interpTrans.setOrigin(worldTrans.getOrigin());
         body_->setInterpolationWorldTransform(interpTrans);
-        body_->updateInertiaTensor();
 
         Activate();
         MarkNetworkUpdate();