Index: code/branches/presentation/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/BoxCollisionShape.cc	(revision 2514)
@@ -45,5 +45,5 @@
 
         this->halfExtents_ = Vector3(1, 1, 1);
-        updateBox();
+        updateShape();
 
         this->registerVariables();
@@ -58,5 +58,5 @@
     void BoxCollisionShape::registerVariables()
     {
-        registerVariable(this->halfExtents_, variableDirection::toclient, new NetworkCallback<BoxCollisionShape>(this, &BoxCollisionShape::updateBox));
+        registerVariable(this->halfExtents_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     }
 
@@ -71,10 +71,7 @@
     }
 
-    void BoxCollisionShape::updateBox()
+    btCollisionShape* BoxCollisionShape::createNewShape() const
     {
-        if (this->collisionShape_)
-            delete this->collisionShape_;
-        this->collisionShape_ = new btBoxShape(omni_cast<btVector3>(this->halfExtents_));
-        this->updateParent();
+        return new btBoxShape(omni_cast<btVector3>(this->halfExtents_));
     }
 }
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/BoxCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/BoxCollisionShape.h	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/BoxCollisionShape.h	(revision 2514)
@@ -46,26 +46,26 @@
 
             inline void setHalfExtents(const Vector3& extents)
-                { this->halfExtents_ = extents; updateBox(); }
+                { this->halfExtents_ = extents; updateShape(); }
             inline const Vector3& getHalfExtents() const
                 { return halfExtents_;}
 
             inline void setWidth(float value)
-                { this->halfExtents_.z = value / 2; updateBox(); }
+                { this->halfExtents_.z = value / 2; updateShape(); }
             inline float getWidth() const
                 { return this->halfExtents_.z * 2; }
 
             inline void setHeight(float value)
-                { this->halfExtents_.y = value / 2; updateBox(); }
+                { this->halfExtents_.y = value / 2; updateShape(); }
             inline float getHeight() const
                 { return this->halfExtents_.y * 2; }
 
             inline void setLength(float value)
-                { this->halfExtents_.x = value / 2; updateBox(); }
+                { this->halfExtents_.x = value / 2; updateShape(); }
             inline float getLength() const
                 { return this->halfExtents_.x * 2; }
 
-            void updateBox();
+        private:
+            btCollisionShape* createNewShape() const;
 
-        private:
             Vector3 halfExtents_;
      };
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 2514)
@@ -42,6 +42,4 @@
 namespace orxonox
 {
-    CreateFactory(CollisionShape);
-
     CollisionShape::CollisionShape(BaseObject* creator)
         : BaseObject(creator)
@@ -62,4 +60,7 @@
     CollisionShape::~CollisionShape()
     {
+        // Detach from parent
+        if (this->isInitialized() && this->parent_)
+            this->parent_->removeChildShape(this);
     }
 
@@ -79,19 +80,12 @@
     void CollisionShape::registerVariables()
     {
-        registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChanged));
+        registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChangedCallback));
     }
 
     void CollisionShape::parentChanged()
     {
-        Synchronisable* synchronisable = Synchronisable::getSynchronisable(this->parentID_);
-        CompoundCollisionShape* CCSparent = dynamic_cast<CompoundCollisionShape*>(synchronisable);
-        if (CCSparent)
-            CCSparent->addChildShape(this);
-        else
-        {
-            WorldEntity* WEparent = dynamic_cast<WorldEntity*>(synchronisable);
-            if (WEparent)
-                WEparent->attachCollisionShape(this);
-        }
+        CompoundCollisionShape* parent = dynamic_cast<CompoundCollisionShape*>(Synchronisable::getSynchronisable(this->parentID_));
+        if (parent)
+            parent->addChildShape(this);
     }
 
@@ -118,4 +112,14 @@
     }
 
+    void CollisionShape::updateShape()
+    {
+        btCollisionShape* oldShape = this->collisionShape_;
+        this->collisionShape_ = this->createNewShape();
+        // When we recreate the shape, we have to inform the parent about this to update the shape
+        this->updateParent();
+        if (oldShape)
+            delete oldShape;
+    }
+
     void CollisionShape::calculateLocalInertia(btScalar mass, btVector3& inertia) const
     {
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.h	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.h	(revision 2514)
@@ -66,4 +66,6 @@
                 { return this->scale_; }
 
+            void updateShape();
+
             void calculateLocalInertia(float mass, btVector3& inertia) const;
 
@@ -78,4 +80,8 @@
         protected:
             virtual void updateParent();
+            virtual void parentChanged();
+            // Note: This is required because the NetworkCallback will not call functions virtually
+            void parentChangedCallback() { this->parentChanged(); }
+            virtual btCollisionShape* createNewShape() const = 0;
 
             btCollisionShape*       collisionShape_;
@@ -83,6 +89,4 @@
 
         private:
-            void parentChanged();
-
             Vector3                 position_;
             Quaternion              orientation_;
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc	(revision 2514)
@@ -54,9 +54,11 @@
         if (this->isInitialized())
         {
-            // Notify children about removal
+            // Delete all children
             for (std::map<CollisionShape*, btCollisionShape*>::iterator it = this->childShapes_.begin();
                 it != this->childShapes_.end(); ++it)
             {
+                // make sure that the child doesn't want to detach itself --> speedup because of the missing update
                 it->first->setParent(0, OBJECTID_UNKNOWN);
+                delete it->first;
             }
 
@@ -197,6 +199,12 @@
         if (this->parent_)
             this->parent_->updateChildShape(this);
-        else if (this->worldEntityParent_)
+        if (this->worldEntityParent_)
             this->worldEntityParent_->notifyCollisionShapeChanged();
+    }
+
+    void CompoundCollisionShape::parentChanged()
+    {
+        if (!this->worldEntityParent_)
+            CollisionShape::parentChanged();
     }
 
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h	(revision 2514)
@@ -33,4 +33,5 @@
 
 #include <vector>
+#include <cassert>
 #include "CollisionShape.h"
 
@@ -59,4 +60,7 @@
         private:
             void updatePublicShape();
+            void parentChanged();
+            inline virtual btCollisionShape* createNewShape() const
+                { assert(false); return 0; }
 
             btCompoundShape* compoundShape_;
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/ConeCollisionShape.cc	(revision 2514)
@@ -46,5 +46,5 @@
         this->radius_ = 1.0f;
         this->height_ = 1.0f;
-        updateCone();
+        updateShape();
 
         this->registerVariables();
@@ -59,6 +59,6 @@
     void ConeCollisionShape::registerVariables()
     {
-        registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<ConeCollisionShape>(this, &ConeCollisionShape::updateCone));
-        registerVariable(this->height_, variableDirection::toclient, new NetworkCallback<ConeCollisionShape>(this, &ConeCollisionShape::updateCone));
+        registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+        registerVariable(this->height_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     }
 
@@ -71,10 +71,7 @@
     }
 
-    void ConeCollisionShape::updateCone()
+    btCollisionShape* ConeCollisionShape::createNewShape() const
     {
-        if (this->collisionShape_)
-            delete this->collisionShape_;
-        this->collisionShape_ = new btConeShape(this->radius_, this->height_);
-        this->updateParent();
+        return  new btConeShape(this->radius_, this->height_);
     }
 }
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/ConeCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/ConeCollisionShape.h	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/ConeCollisionShape.h	(revision 2514)
@@ -46,16 +46,16 @@
 
             inline void setRadius(float value)
-                { this->radius_ = value; updateCone(); }
+                { this->radius_ = value; updateShape(); }
             inline float getRadius() const
                 { return radius_; }
 
             inline void setHeight(float value)
-                { this->height_ = value; updateCone(); }
+                { this->height_ = value; updateShape(); }
             inline float getHeight() const
                 { return this->height_; }
 
-            void updateCone();
+        private:
+            btCollisionShape* createNewShape() const;
 
-        private:
             float radius_;
             float height_;
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc	(revision 2514)
@@ -46,5 +46,5 @@
         this->normal_ = Vector3(0, 1, 0);
         this->offset_ = 0.0f;
-        updatePlane();
+        updateShape();
 
         this->registerVariables();
@@ -59,6 +59,6 @@
     void PlaneCollisionShape::registerVariables()
     {
-        registerVariable(this->normal_, variableDirection::toclient, new NetworkCallback<PlaneCollisionShape>(this, &PlaneCollisionShape::updatePlane));
-        registerVariable(this->offset_, variableDirection::toclient, new NetworkCallback<PlaneCollisionShape>(this, &PlaneCollisionShape::updatePlane));
+        registerVariable(this->normal_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
+        registerVariable(this->offset_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     }
 
@@ -71,10 +71,7 @@
     }
 
-    void PlaneCollisionShape::updatePlane()
+    btCollisionShape* PlaneCollisionShape::createNewShape() const
     {
-        if (this->collisionShape_)
-            delete this->collisionShape_;
-        this->collisionShape_ = new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_);
-        this->updateParent();
+        return new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_);
     }
 }
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h	(revision 2514)
@@ -46,16 +46,16 @@
 
             inline void setNormal(const Vector3& normal)
-                { this->normal_ = normal; updatePlane(); }
+                { this->normal_ = normal; updateShape(); }
             inline const Vector3& getNormal()
                 { return normal_;}
 
             inline void setOffset(float offset)
-                { this->offset_ = offset; updatePlane(); }
+                { this->offset_ = offset; updateShape(); }
             inline float getOffset()
                 { return this->offset_;}
 
-            void updatePlane();
+        private:
+            btCollisionShape* createNewShape()const;
 
-        private:
             Vector3 normal_;
             float   offset_;
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc	(revision 2514)
@@ -45,5 +45,5 @@
 
         this->radius_ = 1.0f;
-        updateSphere();
+        updateShape();
 
         this->registerVariables();
@@ -58,5 +58,5 @@
     void SphereCollisionShape::registerVariables()
     {
-        registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<SphereCollisionShape>(this, &SphereCollisionShape::updateSphere));
+        registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::updateShape));
     }
 
@@ -68,11 +68,7 @@
     }
 
-    void SphereCollisionShape::updateSphere()
+    btCollisionShape* SphereCollisionShape::createNewShape() const
     {
-        if (this->collisionShape_)
-            delete this->collisionShape_;
-        // When we recreate the shape, we have to inform the parent about this to update the shape
-        this->collisionShape_ = new btSphereShape(this->radius_);
-        this->updateParent();
+        return new btSphereShape(this->radius_);
     }
 }
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.h	(revision 2486)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.h	(revision 2514)
@@ -46,11 +46,11 @@
 
             inline void setRadius(float radius)
-                { this->radius_ = radius; updateSphere(); }
+                { this->radius_ = radius; updateShape(); }
             inline float getRadius() const
                 { return this->radius_; }
 
-            void updateSphere();
+        private:
+            btCollisionShape* createNewShape() const;
 
-        private:
             float radius_;
     };
