Index: /code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.cc
===================================================================
--- /code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 2451)
+++ /code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 2452)
@@ -108,10 +108,10 @@
     }
 
-    btVector3 CollisionShape::getLocalInertia(btScalar mass) const
+    void CollisionShape::calculateLocalInertia(btScalar mass, btVector3& inertia) const
     {
-        btVector3 inertia(0, 0, 0);
         if (this->collisionShape_)
             this->collisionShape_->calculateLocalInertia(mass, inertia);
-        return inertia;
+        else
+            inertia.setValue(0, 0, 0);
     }
 }
Index: /code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.h
===================================================================
--- /code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.h	(revision 2451)
+++ /code/branches/physics_merge/src/orxonox/objects/collisionshapes/CollisionShape.h	(revision 2452)
@@ -66,5 +66,5 @@
                 { return this->scale_; }
 
-            btVector3 getLocalInertia(float mass) const;
+            void calculateLocalInertia(float mass, btVector3& inertia) const;
 
             inline btCollisionShape* getCollisionShape() const
Index: /code/branches/physics_merge/src/orxonox/objects/worldentities/MobileEntity.cc
===================================================================
--- /code/branches/physics_merge/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 2451)
+++ /code/branches/physics_merge/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 2452)
@@ -51,6 +51,4 @@
         this->angularAcceleration_ = Vector3::ZERO;
         this->angularVelocity_     = Vector3::ZERO;
-
-        this->registerVariables();
     }
 
@@ -66,8 +64,4 @@
         XMLPortParamTemplate(MobileEntity, "rotationaxis", setRotationAxis, getRotationAxis, xmlelement, mode, const Vector3&);
         XMLPortParam(MobileEntity, "rotationrate", setRotationRate, getRotationRate, xmlelement, mode);
-    }
-
-    void MobileEntity::registerVariables()
-    {
     }
 
Index: /code/branches/physics_merge/src/orxonox/objects/worldentities/MobileEntity.h
===================================================================
--- /code/branches/physics_merge/src/orxonox/objects/worldentities/MobileEntity.h	(revision 2451)
+++ /code/branches/physics_merge/src/orxonox/objects/worldentities/MobileEntity.h	(revision 2452)
@@ -45,5 +45,4 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
             virtual void tick(float dt);
-            void registerVariables();
 
             virtual void setPosition(const Vector3& position);
Index: /code/branches/physics_merge/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- /code/branches/physics_merge/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2451)
+++ /code/branches/physics_merge/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2452)
@@ -605,4 +605,7 @@
     void WorldEntity::recalculateMassProps()
     {
+        // Store local inertia for faster access. Evaluates to (0,0,0) if there is no collision shape.
+        float totalMass = this->mass_ + this->childrenMass_;
+        this->collisionShape_->calculateLocalInertia(totalMass, this->localInertia_);
         if (this->hasPhysics())
         {
@@ -616,10 +619,11 @@
                 // Use default values to avoid very large or very small values
                 CCOUT(4) << "Warning: Setting the internal physical mass to 1.0 because mass_ is 0.0." << std::endl;
-                this->physicalBody_->setMassProps(1.0f, this->collisionShape_->getLocalInertia(1.0f));
+                btVector3 inertia(0, 0, 0);
+                this->collisionShape_->calculateLocalInertia(1.0f, inertia);
+                this->physicalBody_->setMassProps(1.0f, inertia);
             }
             else
             {
-                float mass = this->mass_ + this->childrenMass_;
-                this->physicalBody_->setMassProps(mass, this->collisionShape_->getLocalInertia(mass));
+                this->physicalBody_->setMassProps(totalMass, this->localInertia_);
             }
         }
Index: /code/branches/physics_merge/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- /code/branches/physics_merge/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2451)
+++ /code/branches/physics_merge/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2452)
@@ -199,4 +199,7 @@
             inline float getTotalMass() const
                 { return this->mass_ + this->childrenMass_; }
+
+            inline const btVector3& getLocalInertia() const
+                { return this->localInertia_; }
 
             inline void setRestitution(float restitution)
@@ -269,4 +272,5 @@
             CompoundCollisionShape*      collisionShape_;
             btScalar                     mass_;
+            btVector3                    localInertia_;
             btScalar                     restitution_;
             btScalar                     angularFactor_;
