Index: code/branches/presentation/src/orxonox/objects/CMakeLists.txt
===================================================================
--- code/branches/presentation/src/orxonox/objects/CMakeLists.txt	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/CMakeLists.txt	(revision 2459)
@@ -13,4 +13,5 @@
 )
 
+ADD_SOURCE_DIRECTORY(SRC_FILES collisionshapes)
 ADD_SOURCE_DIRECTORY(SRC_FILES controllers)
 ADD_SOURCE_DIRECTORY(SRC_FILES gametypes)
Index: code/branches/presentation/src/orxonox/objects/Scene.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/Scene.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/Scene.cc	(revision 2459)
@@ -22,4 +22,5 @@
  *   Author:
  *      Fabian 'x3n' Landau
+ *      Reto Grieder (physics)
  *   Co-authors:
  *      ...
@@ -35,7 +36,14 @@
 #include <OgreLight.h>
 
+#include "BulletCollision/BroadphaseCollision/btAxisSweep3.h"
+#include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
+
 #include "core/CoreIncludes.h"
 #include "core/Core.h"
 #include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+#include "objects/worldentities/WorldEntity.h"
 
 namespace orxonox
@@ -69,4 +77,15 @@
             this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
         }
+
+        // No physics yet, XMLPort will do that.
+        const int defaultMaxWorldSize = 100000;
+        this->negativeWorldRange_ = Vector3::UNIT_SCALE * -defaultMaxWorldSize;
+        this->positiveWorldRange_ = Vector3::UNIT_SCALE *  defaultMaxWorldSize;
+        this->gravity_ = Vector3::ZERO;
+        this->physicalWorld_   = 0;
+        this->solver_          = 0;
+        this->dispatcher_      = 0;
+        this->collisionConfig_ = 0;
+        this->broadphase_      = 0;
 
         // test test test
@@ -91,5 +110,4 @@
             if (Ogre::Root::getSingletonPtr())
             {
-//                this->sceneManager_->destroySceneNode(this->rootSceneNode_->getName()); // TODO: remove getName() for newer versions of Ogre
                 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
             }
@@ -98,4 +116,6 @@
                 delete this->sceneManager_;
             }
+
+            this->setPhysicalWorld(false);
         }
     }
@@ -109,4 +129,8 @@
         XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
 
+        XMLPortParam(Scene, "negativeWorldRange", setNegativeWorldRange, getNegativeWorldRange, xmlelement, mode);
+        XMLPortParam(Scene, "positiveWorldRange", setPositiveWorldRange, getPositiveWorldRange, xmlelement, mode);
+        XMLPortParam(Scene, "hasPhysics", setPhysicalWorld, hasPhysics, xmlelement, mode).defaultValues(true);
+
         XMLPortObjectExtended(Scene, BaseObject, "", addObject, getObject, xmlelement, mode, true, false);
     }
@@ -114,6 +138,123 @@
     void Scene::registerVariables()
     {
-        registerVariable(this->skybox_,     variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
-        registerVariable(this->ambientLight_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
+        registerVariable(this->skybox_,             variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
+        registerVariable(this->ambientLight_,       variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
+        registerVariable(this->negativeWorldRange_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_negativeWorldRange));
+        registerVariable(this->positiveWorldRange_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_positiveWorldRange));
+        registerVariable(this->gravity_,            variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_gravity));
+        registerVariable(this->bHasPhysics_,        variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics));
+    }
+
+    void Scene::setNegativeWorldRange(const Vector3& range)
+    {
+        if (range.length() < 10.0f)
+        {
+            CCOUT(2) << "Warning: Setting the negative world range to a very small value: "
+                     << omni_cast<std::string>(range) << std::endl;
+        }
+        if (this->hasPhysics())
+        {
+            CCOUT(2) << "Warning: Attempting to set the physical world range at run time. " 
+                     << "This causes a complete physical reload which might take some time." << std::endl;
+            this->setPhysicalWorld(false);
+            this->negativeWorldRange_ = range;
+            this->setPhysicalWorld(true);
+        }
+        else
+            this->negativeWorldRange_ = range;
+    }
+
+    void Scene::setPositiveWorldRange(const Vector3& range)
+    {
+        if (range.length() < 10.0f)
+        {
+            CCOUT(2) << "Warning: Setting the positive world range to a very small value: "
+                     << omni_cast<std::string>(range) << std::endl;
+        }
+        if (this->hasPhysics())
+        {
+            CCOUT(2) << "Warning: Attempting to set the physical world range at run time. " 
+                     << "This causes a complete physical reload which might take some time." << std::endl;
+            this->setPhysicalWorld(false);
+            this->positiveWorldRange_ = range;
+            this->setPhysicalWorld(true);
+        }
+        else
+            this->positiveWorldRange_ = range;
+    }
+
+    void Scene::setGravity(const Vector3& gravity)
+    {
+        this->gravity_ = gravity;
+        if (this->hasPhysics())
+            this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
+    }
+
+    void Scene::setPhysicalWorld(bool wantPhysics)
+    {
+        this->bHasPhysics_ = wantPhysics;
+        if (wantPhysics && !hasPhysics())
+        {
+            // Note: These are all little known default classes and values.
+            //       It would require further investigation to properly dertermine the right choices.
+            this->broadphase_      = new bt32BitAxisSweep3(
+                omni_cast<btVector3>(this->negativeWorldRange_), omni_cast<btVector3>(this->positiveWorldRange_));
+            this->collisionConfig_ = new btDefaultCollisionConfiguration();
+            this->dispatcher_      = new btCollisionDispatcher(this->collisionConfig_);
+            this->solver_          = new btSequentialImpulseConstraintSolver;
+
+            this->physicalWorld_   = new btDiscreteDynamicsWorld(this->dispatcher_, this->broadphase_, this->solver_, this->collisionConfig_);
+            this->physicalWorld_->setGravity(omni_cast<btVector3>(this->gravity_));
+        }
+        else if (!wantPhysics && hasPhysics())
+        {
+            // Remove all WorldEntities and shove them to the queue since they would still like to be in a physical world.
+            for (std::set<WorldEntity*>::const_iterator it = this->physicalObjects_.begin();
+                it != this->physicalObjects_.end(); ++it)
+            {
+                this->physicalWorld_->removeRigidBody((*it)->getPhysicalBody());
+                this->physicalObjectQueue_.insert(*it);
+            }
+            this->physicalObjects_.clear();
+
+            delete this->physicalWorld_;
+            delete this->solver_;
+            delete this->dispatcher_;
+            delete this->collisionConfig_;
+            delete this->broadphase_;
+            this->physicalWorld_   = 0;
+            this->solver_          = 0;
+            this->dispatcher_      = 0;
+            this->collisionConfig_ = 0;
+            this->broadphase_      = 0;
+        }
+    }
+
+    void Scene::tick(float dt)
+    {
+        if (!Core::showsGraphics())
+        {
+            // We need to update the scene nodes if we don't render
+            this->rootSceneNode_->_update(true, false);
+        }
+        if (this->hasPhysics())
+        {
+            // TODO: This here is bad practice! It will slow down the first tick() by ages.
+            //       Rather have an initialise() method as well, called by the Level after everything has been loaded.
+            if (this->physicalObjectQueue_.size() > 0)
+            {
+                // Add all scheduled WorldEntities
+                for (std::set<WorldEntity*>::const_iterator it = this->physicalObjectQueue_.begin();
+                    it != this->physicalObjectQueue_.end(); ++it)
+                {
+                    this->physicalWorld_->addRigidBody((*it)->getPhysicalBody());
+                }
+                this->physicalObjectQueue_.clear();
+            }
+
+            // Note: 60 means that Bullet will do physics correctly down to 1 frames per seconds.
+            //       Under that mark, the simulation will "loose time" and get unusable.
+            physicalWorld_->stepSimulation(dt, 60);
+        }
     }
 
@@ -165,11 +306,33 @@
     }
 
-    void Scene::tick(float dt)
-    {
-        if (!Core::showsGraphics())
-        {
-            // We need to update the scene nodes if we don't render
-            this->rootSceneNode_->_update(true, false);
-        }
+    void Scene::addPhysicalObject(WorldEntity* object)
+    {
+        if (object)
+        {
+            std::set<WorldEntity*>::iterator it = this->physicalObjects_.find(object);
+            if (it != this->physicalObjects_.end())
+                return;
+
+            this->physicalObjectQueue_.insert(object);
+        }
+    }
+
+    void Scene::removePhysicalObject(WorldEntity* object)
+    {
+        // check queue first
+        std::set<WorldEntity*>::iterator it = this->physicalObjectQueue_.find(object);
+        if (it != this->physicalObjectQueue_.end())
+        {
+            this->physicalObjectQueue_.erase(it);
+            return;
+        }
+
+        it = this->physicalObjects_.find(object);
+        if (it == this->physicalObjects_.end())
+            return;
+        this->physicalObjects_.erase(it);
+
+        if (this->hasPhysics())
+            this->physicalWorld_->removeRigidBody(object->getPhysicalBody());
     }
 }
Index: code/branches/presentation/src/orxonox/objects/Scene.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/Scene.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/Scene.h	(revision 2459)
@@ -22,4 +22,5 @@
  *   Author:
  *      Fabian 'x3n' Landau
+ *      Reto Grieder (physics)
  *   Co-authors:
  *      ...
@@ -76,10 +77,60 @@
                 { this->setAmbientLight(this->ambientLight_); }
 
-            Ogre::SceneManager*    sceneManager_;
-            Ogre::SceneNode*       rootSceneNode_;
-            std::string            skybox_;
-            ColourValue            ambientLight_;
-            std::list<BaseObject*> objects_;
-            bool                   bShadows_;
+            Ogre::SceneManager*      sceneManager_;
+            Ogre::SceneNode*         rootSceneNode_;
+
+            std::string              skybox_;
+            ColourValue              ambientLight_;
+            std::list<BaseObject*>   objects_;
+            bool                     bShadows_;
+
+
+        /////////////
+        // Physics //
+        /////////////
+
+        public:
+            inline bool hasPhysics()
+                { return this->physicalWorld_ != 0; }
+            void setPhysicalWorld(bool wantsPhysics);
+
+            void setNegativeWorldRange(const Vector3& range);
+            inline const Vector3& getNegativeWorldRange() const
+                { return this->negativeWorldRange_; }
+
+            void setPositiveWorldRange(const Vector3& range);
+            inline const Vector3& getPositiveWorldRange() const
+                { return this->positiveWorldRange_; }
+
+            void setGravity(const Vector3& gravity);
+            inline const Vector3& getGravity() const
+                { return this->gravity_; }
+
+            void addPhysicalObject(WorldEntity* object);
+            void removePhysicalObject(WorldEntity* object);
+
+        private:
+            inline void networkcallback_hasPhysics()
+                { this->setPhysicalWorld(this->bHasPhysics_); }
+            inline void networkcallback_negativeWorldRange()
+                { this->setNegativeWorldRange(this->negativeWorldRange_); }
+            inline void networkcallback_positiveWorldRange()
+                { this->setPositiveWorldRange(this->positiveWorldRange_); }
+            inline void networkcallback_gravity()
+                { this->setGravity(this->gravity_); }
+
+            // Bullet objects
+            btDiscreteDynamicsWorld*             physicalWorld_;
+            bt32BitAxisSweep3*                   broadphase_;
+            btDefaultCollisionConfiguration*     collisionConfig_;
+            btCollisionDispatcher*               dispatcher_;
+            btSequentialImpulseConstraintSolver* solver_;
+
+            std::set<WorldEntity*>               physicalObjectQueue_;
+            std::set<WorldEntity*>               physicalObjects_;
+            bool                                 bHasPhysics_;
+            Vector3                              negativeWorldRange_;
+            Vector3                              positiveWorldRange_;
+            Vector3                              gravity_;
     };
 }
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CMakeLists.txt
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CMakeLists.txt	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CMakeLists.txt	(revision 2459)
@@ -0,0 +1,8 @@
+SET( SRC_FILES
+  CollisionShape.cc
+  CompoundCollisionShape.cc
+  PlaneCollisionShape.cc
+  SphereCollisionShape.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.cc	(revision 2459)
@@ -0,0 +1,117 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "CollisionShape.h"
+
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+#include "CompoundCollisionShape.h"
+
+namespace orxonox
+{
+    CreateFactory(CollisionShape);
+
+    CollisionShape::CollisionShape(BaseObject* creator)
+        : BaseObject(creator)
+        , Synchronisable(creator)
+    {
+        RegisterObject(CollisionShape);
+
+        this->parent_ = 0;
+        this->parentID_ = OBJECTID_UNKNOWN;
+        this->collisionShape_ = 0;
+        this->position_ = Vector3::ZERO;
+        this->orientation_ = Quaternion::IDENTITY;
+        this->scale_ = Vector3::UNIT_SCALE;
+    }
+
+    CollisionShape::~CollisionShape()
+    {
+    }
+
+    void CollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(CollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParamTemplate(CollisionShape, "position", setPosition, getPosition, xmlelement, mode, const Vector3&);
+        XMLPortParamTemplate(CollisionShape, "orientation", setOrientation, getOrientation, xmlelement, mode, const Quaternion&);
+        XMLPortParamTemplate(CollisionShape, "scale3D", setScale3D, getScale3D, xmlelement, mode, const Vector3&);
+        XMLPortParamLoadOnly(CollisionShape, "scale", setScale, xmlelement, mode);
+        XMLPortParamLoadOnly(CollisionShape, "yaw",   yaw,   xmlelement, mode);
+        XMLPortParamLoadOnly(CollisionShape, "pitch", pitch, xmlelement, mode);
+        XMLPortParamLoadOnly(CollisionShape, "roll",  roll,  xmlelement, mode);
+    }
+
+    void CollisionShape::registerVariables()
+    {
+        registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<CollisionShape>(this, &CollisionShape::parentChanged));
+    }
+
+    void CollisionShape::parentChanged()
+    {
+        CompoundCollisionShape* parent = dynamic_cast<CompoundCollisionShape*>(Synchronisable::getSynchronisable(this->parentID_));
+        if (parent)
+            parent->addChildShape(this);
+    }
+
+    void CollisionShape::updateParent()
+    {
+        if (this->parent_)
+            this->parent_->updateChildShape(this);
+    }
+
+    bool CollisionShape::hasTransform() const
+    {
+        return (!this->position_.positionEquals(Vector3(0, 0, 0), 0.001) ||
+                !this->orientation_.equals(Quaternion(1,0,0,0), Degree(0.1)));
+    }
+
+    void CollisionShape::setScale3D(const Vector3& scale)
+    {
+        CCOUT(2) << "Warning: Cannot set the scale of a collision shape: Not yet implemented." << std::endl;
+    }
+
+    void CollisionShape::setScale(float scale)
+    {
+        CCOUT(2) << "Warning: Cannot set the scale of a collision shape: Not yet implemented." << std::endl;
+    }
+
+    void CollisionShape::calculateLocalInertia(btScalar mass, btVector3& inertia) const
+    {
+        if (this->collisionShape_)
+            this->collisionShape_->calculateLocalInertia(mass, inertia);
+        else
+            inertia.setValue(0, 0, 0);
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.h	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CollisionShape.h	(revision 2459)
@@ -0,0 +1,94 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _CollisionShape_H__
+#define _CollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "core/BaseObject.h"
+#include "network/synchronisable/Synchronisable.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport CollisionShape : public BaseObject, public Synchronisable
+    {
+        public:
+            CollisionShape(BaseObject* creator);
+            virtual ~CollisionShape();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            void registerVariables();
+
+            inline void setPosition(const Vector3& position)
+                { this->position_ = position; this->updateParent(); }
+            inline const Vector3& getPosition() const
+                { return this->position_; }
+
+            inline void setOrientation(const Quaternion& orientation)
+                { this->orientation_ = orientation; this->updateParent(); }
+            inline const Quaternion& getOrientation() const
+                { return this->orientation_; }
+
+            void yaw(const Degree& angle)   { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Y)); }
+            void pitch(const Degree& angle) { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_X)); }
+            void roll(const Degree& angle)  { this->setOrientation(this->orientation_ * Quaternion(angle, Vector3::UNIT_Z)); }
+
+            virtual void setScale3D(const Vector3& scale);
+            virtual void setScale(float scale);
+            inline const Vector3& getScale3D(void) const
+                { return this->scale_; }
+
+            void calculateLocalInertia(float mass, btVector3& inertia) const;
+
+            inline btCollisionShape* getCollisionShape() const
+                { return this->collisionShape_; }
+
+            bool hasTransform() const;
+
+            inline void setParent(CompoundCollisionShape* shape, unsigned int ID)
+                { this->parent_ = shape; this->parentID_ = ID; }
+
+        protected:
+            virtual void updateParent();
+
+            btCollisionShape*       collisionShape_;
+            CompoundCollisionShape* parent_;
+
+        private:
+            void parentChanged();
+
+            Vector3                 position_;
+            Quaternion              orientation_;
+            Vector3                 scale_;
+            unsigned int            parentID_;
+    };
+}
+
+#endif /* _CollisionShape_H__ */
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.cc	(revision 2459)
@@ -0,0 +1,192 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "CompoundCollisionShape.h"
+
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+#include "objects/worldentities/WorldEntity.h"
+
+namespace orxonox
+{
+    CreateFactory(CompoundCollisionShape);
+
+    CompoundCollisionShape::CompoundCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(CompoundCollisionShape);
+
+        this->compoundShape_  = new btCompoundShape();
+    }
+
+    CompoundCollisionShape::~CompoundCollisionShape()
+    {
+        if (this->isInitialized())
+        {
+            // Detatch all children first
+            this->removeAllChildShapes();
+            delete this->compoundShape_;
+        }
+    }
+
+    void CompoundCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(CompoundCollisionShape, XMLPort, xmlelement, mode);
+        // Attached collision shapes
+        XMLPortObject(CompoundCollisionShape, CollisionShape, "", addChildShape, getChildShape, xmlelement, mode);
+    }
+
+    void CompoundCollisionShape::addChildShape(CollisionShape* shape)
+    {
+        if (!shape || static_cast<CollisionShape*>(this) == shape)
+            return;
+        if (this->childShapes_.find(shape) != this->childShapes_.end())
+        {
+            CCOUT(2) << "Warning: Attaching a CollisionShape twice is not yet supported." << std::endl;
+            return;
+        }
+        this->childShapes_[shape] = shape->getCollisionShape();
+
+        if (shape->getCollisionShape())
+        {
+            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
+            btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
+            this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
+
+            this->updatePublicShape();
+        }
+
+        // network synchro
+        shape->setParent(this, this->getObjectID());
+    }
+
+    void CompoundCollisionShape::removeChildShape(CollisionShape* shape)
+    {
+        if (this->childShapes_.find(shape) != this->childShapes_.end())
+        {
+            shape->setParent(0, OBJECTID_UNKNOWN);
+            this->childShapes_.erase(shape);
+            if (shape->getCollisionShape())
+                this->compoundShape_->removeChildShape(shape->getCollisionShape());
+
+            this->updatePublicShape();
+        }
+    }
+
+    void CompoundCollisionShape::removeAllChildShapes()
+    {
+        while (this->childShapes_.size() > 0)
+            this->removeChildShape(this->childShapes_.begin()->first);
+    }
+
+    void CompoundCollisionShape::updateChildShape(CollisionShape* shape)
+    {
+        if (!shape)
+            return;
+        std::map<CollisionShape*, btCollisionShape*>::iterator it = this->childShapes_.find(shape);
+        if (it == this->childShapes_.end())
+        {
+            CCOUT(2) << "Warning: Cannot update child shape: Instance not a child." << std::endl;
+            return;
+        }
+
+        // Remove old btCollisionShape, stored in the children map
+        if (it->second)
+            this->compoundShape_->removeChildShape(it->second);
+        if (shape->getCollisionShape())
+        {
+            // Only actually attach if we didn't pick a CompoundCollisionShape with no content
+            btTransform transf(omni_cast<btQuaternion>(shape->getOrientation()), omni_cast<btVector3>(shape->getPosition()));
+            this->compoundShape_->addChildShape(transf, shape->getCollisionShape());
+            it->second = shape->getCollisionShape();
+        }
+
+        this->updatePublicShape();
+    }
+
+    void CompoundCollisionShape::updatePublicShape()
+    {
+        btCollisionShape* primitive = 0;
+        bool bPrimitive = true;
+        bool bEmpty = true;
+        for (std::map<CollisionShape*, btCollisionShape*>::const_iterator it = this->childShapes_.begin(); it != this->childShapes_.end(); ++it)
+        {
+            if (it->second)
+            {
+                bEmpty = false;
+                if (!it->first->hasTransform())
+                    primitive = it->second;
+                else
+                    bPrimitive = false;
+            }
+        }
+        if (bEmpty)
+            this->collisionShape_ = 0;
+        else if (bPrimitive)
+        {
+            // --> Only one shape to be added, no transform; return it directly
+            this->collisionShape_ = primitive;
+        }
+        else
+        {
+            // Make sure we use the compound shape when returning a btCollisionShape
+            this->collisionShape_ = this->compoundShape_;
+        }
+        this->updateParent();
+    }
+
+    void CompoundCollisionShape::updateParent()
+    {
+        if (this->parent_)
+            this->parent_->updateChildShape(this);
+        else
+        {
+            // We can do this, because the CompoundCollisionShape of a WorldEntity always belongs to it,
+            // as long as its lifetime.
+            WorldEntity* parent = dynamic_cast<WorldEntity*>(this->getCreator());
+            if (parent)
+                parent->notifyCollisionShapeChanged();
+        }
+    }
+
+    CollisionShape* CompoundCollisionShape::getChildShape(unsigned int index) const
+    {
+        unsigned int i = 0;
+        for (std::map<CollisionShape*, btCollisionShape*>::const_iterator it = this->childShapes_.begin(); it != this->childShapes_.end(); ++it)
+        {
+            if (i == index)
+                return it->first;
+            ++i;
+        }
+        return 0;
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/CompoundCollisionShape.h	(revision 2459)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _CompoundCollisionShape_H__
+#define _CompoundCollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <vector>
+#include "CollisionShape.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport CompoundCollisionShape : public CollisionShape
+    {
+        public:
+            CompoundCollisionShape(BaseObject* creator);
+            virtual ~CompoundCollisionShape();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void addChildShape(CollisionShape* shape);
+            void removeChildShape(CollisionShape* shape);
+            void removeAllChildShapes();
+            CollisionShape* getChildShape(unsigned int index) const;
+
+            void updateChildShape(CollisionShape* shape);
+
+        protected:
+            virtual void updateParent();
+
+        private:
+            void updatePublicShape();
+
+            btCompoundShape* compoundShape_;
+            std::map<CollisionShape*, btCollisionShape*> childShapes_;
+    };
+}
+
+#endif /* _CompoundCollisionShape_H__ */
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.cc	(revision 2459)
@@ -0,0 +1,80 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Martin Stypinski
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "PlaneCollisionShape.h"
+
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    CreateFactory(PlaneCollisionShape);
+
+    PlaneCollisionShape::PlaneCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(PlaneCollisionShape);
+
+        this->normal_ = Vector3(0, 1, 0);
+        this->offset_ = 0.0f;
+        updatePlane();
+
+        this->registerVariables();
+    }
+
+    PlaneCollisionShape::~PlaneCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    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));
+    }
+
+    void PlaneCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PlaneCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(PlaneCollisionShape, "normal", setNormal, getNormal, xmlelement, mode);
+        XMLPortParam(PlaneCollisionShape, "offset", setOffset, getOffset, xmlelement, mode);    
+    }
+
+    void PlaneCollisionShape::updatePlane()
+    {
+        if (this->collisionShape_)
+            delete this->collisionShape_;
+        this->collisionShape_ = new btStaticPlaneShape(omni_cast<btVector3>(this->normal_), this->offset_);
+        this->updateParent();
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/PlaneCollisionShape.h	(revision 2459)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Martin Stypinski
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _PlaneCollisionShape_H__
+#define _PlaneCollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "CollisionShape.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport PlaneCollisionShape : public CollisionShape
+    {
+        public:
+            PlaneCollisionShape(BaseObject* creator);
+            virtual ~PlaneCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setNormal(const Vector3& normal)
+                { this->normal_ = normal; updatePlane(); }
+            inline const Vector3& getNormal()
+                { return normal_;}
+
+            inline void setOffset(float offset)
+                { this->offset_ = offset; updatePlane(); }
+            inline float getOffset()
+                { return this->offset_;}
+
+            void updatePlane();
+
+        private:
+            Vector3 normal_;
+            float   offset_;
+     };
+}
+
+#endif /* _PlaneCollisionShape_H__ */
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.cc	(revision 2459)
@@ -0,0 +1,78 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "SphereCollisionShape.h"
+
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "tools/BulletConversions.h"
+
+namespace orxonox
+{
+    CreateFactory(SphereCollisionShape);
+
+    SphereCollisionShape::SphereCollisionShape(BaseObject* creator) : CollisionShape(creator)
+    {
+        RegisterObject(SphereCollisionShape);
+
+        this->radius_ = 1.0f;
+        updateSphere();
+
+        this->registerVariables();
+    }
+
+    SphereCollisionShape::~SphereCollisionShape()
+    {
+        if (this->isInitialized())
+            delete this->collisionShape_;
+    }
+
+    void SphereCollisionShape::registerVariables()
+    {
+        registerVariable(this->radius_, variableDirection::toclient, new NetworkCallback<SphereCollisionShape>(this, &SphereCollisionShape::updateSphere));
+    }
+
+    void SphereCollisionShape::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(SphereCollisionShape, XMLPort, xmlelement, mode);
+
+        XMLPortParam(SphereCollisionShape, "radius", setRadius, getRadius, xmlelement, mode);
+    }
+
+    void SphereCollisionShape::updateSphere()
+    {
+        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();
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.h	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/collisionshapes/SphereCollisionShape.h	(revision 2459)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _SphereCollisionShape_H__
+#define _SphereCollisionShape_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "CollisionShape.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport SphereCollisionShape : public CollisionShape
+    {
+        public:
+            SphereCollisionShape(BaseObject* creator);
+            virtual ~SphereCollisionShape();
+
+            void registerVariables();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            inline void setRadius(float radius)
+                { this->radius_ = radius; updateSphere(); }
+            inline float getRadius() const
+                { return this->radius_;}
+
+            void updateSphere();
+
+        private:
+            float radius_;
+    };
+}
+
+#endif /* _SphereCollisionShape_H__ */
Index: code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.cc	(revision 2459)
@@ -53,5 +53,5 @@
         Constructor. Registers the object and initializes defaults.
     */
-    QuestEffectBeacon::QuestEffectBeacon(BaseObject* creator) : PositionableEntity(creator)
+    QuestEffectBeacon::QuestEffectBeacon(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(QuestEffectBeacon);
Index: code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/quest/QuestEffectBeacon.h	(revision 2459)
@@ -37,5 +37,5 @@
 #include "OrxonoxPrereqs.h"
 
-#include "orxonox/objects/worldentities/PositionableEntity.h"
+#include "orxonox/objects/worldentities/StaticEntity.h"
 
 namespace orxonox
@@ -80,5 +80,5 @@
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport QuestEffectBeacon : public PositionableEntity
+    class _OrxonoxExport QuestEffectBeacon : public StaticEntity
     {
         public:
Index: code/branches/presentation/src/orxonox/objects/worldentities/Backlight.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Backlight.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Backlight.h	(revision 2459)
@@ -32,10 +32,10 @@
 #include "OrxonoxPrereqs.h"
 
-#include "PositionableEntity.h"
+#include "StaticEntity.h"
 #include "tools/BillboardSet.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Backlight : public PositionableEntity
+    class _OrxonoxExport Backlight : public StaticEntity
     {
         public:
Index: code/branches/presentation/src/orxonox/objects/worldentities/Billboard.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Billboard.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Billboard.cc	(revision 2459)
@@ -30,4 +30,6 @@
 #include "Billboard.h"
 
+#include <OgreBillboardSet.h>
+
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
@@ -38,5 +40,5 @@
     CreateFactory(Billboard);
 
-    Billboard::Billboard(BaseObject* creator) : PositionableEntity(creator)
+    Billboard::Billboard(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(Billboard);
@@ -50,5 +52,5 @@
         {
             if (this->isInitialized() && this->billboard_.getBillboardSet())
-                this->getNode()->detachObject(this->billboard_.getName());
+                this->detachOgreObject(this->billboard_.getName());
         }
     }
@@ -76,5 +78,5 @@
                 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
                 if (this->billboard_.getBillboardSet())
-                    this->getNode()->attachObject(this->billboard_.getBillboardSet());
+                     this->attachOgreObject(this->billboard_.getBillboardSet());
                 this->billboard_.setVisible(this->isVisible());
             }
@@ -92,5 +94,5 @@
                 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
                 if (this->billboard_.getBillboardSet())
-                    this->getNode()->attachObject(this->billboard_.getBillboardSet());
+                    this->attachOgreObject(this->billboard_.getBillboardSet());
                 this->billboard_.setVisible(this->isVisible());
             }
Index: code/branches/presentation/src/orxonox/objects/worldentities/Billboard.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Billboard.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Billboard.h	(revision 2459)
@@ -31,5 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
-#include "PositionableEntity.h"
+#include "StaticEntity.h"
 #include "util/Math.h"
 #include "tools/BillboardSet.h"
@@ -37,5 +37,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport Billboard : public PositionableEntity
+    class _OrxonoxExport Billboard : public StaticEntity
     {
         public:
Index: code/branches/presentation/src/orxonox/objects/worldentities/CMakeLists.txt
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2459)
@@ -1,6 +1,7 @@
 SET( SRC_FILES
   WorldEntity.cc
-  PositionableEntity.cc
+  StaticEntity.cc
   MovableEntity.cc
+  MobileEntity.cc
   ControllableEntity.cc
   Model.cc
Index: code/branches/presentation/src/orxonox/objects/worldentities/Camera.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Camera.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Camera.cc	(revision 2459)
@@ -48,5 +48,5 @@
     CreateFactory(Camera);
 
-    Camera::Camera(BaseObject* creator) : PositionableEntity(creator)
+    Camera::Camera(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(Camera);
@@ -56,5 +56,5 @@
 
         this->camera_ = this->getScene()->getSceneManager()->createCamera(getUniqueNumberString());
-        this->getNode()->attachObject(this->camera_);
+        this->attachOgreObject(this->camera_);
 
         this->bHasFocus_ = false;
Index: code/branches/presentation/src/orxonox/objects/worldentities/Camera.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Camera.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Camera.h	(revision 2459)
@@ -33,10 +33,10 @@
 
 #include <OgrePrerequisites.h>
-#include "objects/worldentities/PositionableEntity.h"
+#include "objects/worldentities/StaticEntity.h"
 #include "objects/Tickable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Camera : public PositionableEntity, public Tickable
+    class _OrxonoxExport Camera : public StaticEntity, public Tickable
     {
         friend class CameraManager;
Index: code/branches/presentation/src/orxonox/objects/worldentities/CameraPosition.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/CameraPosition.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/CameraPosition.cc	(revision 2459)
@@ -38,5 +38,5 @@
     CreateFactory(CameraPosition);
 
-    CameraPosition::CameraPosition(BaseObject* creator) : PositionableEntity(creator)
+    CameraPosition::CameraPosition(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(CameraPosition);
Index: code/branches/presentation/src/orxonox/objects/worldentities/CameraPosition.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/CameraPosition.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/CameraPosition.h	(revision 2459)
@@ -32,9 +32,9 @@
 #include "OrxonoxPrereqs.h"
 
-#include "objects/worldentities/PositionableEntity.h"
+#include "objects/worldentities/StaticEntity.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport CameraPosition : public PositionableEntity
+    class _OrxonoxExport CameraPosition : public StaticEntity
     {
         public:
Index: code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2459)
@@ -23,5 +23,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Reto Grieder
  *
  */
@@ -44,5 +44,5 @@
     CreateFactory(ControllableEntity);
 
-    ControllableEntity::ControllableEntity(BaseObject* creator) : WorldEntity(creator)
+    ControllableEntity::ControllableEntity(BaseObject* creator) : MobileEntity(creator)
     {
         RegisterObject(ControllableEntity);
@@ -57,16 +57,15 @@
         this->bDestroyWhenPlayerLeft_ = false;
 
-        this->velocity_ = Vector3::ZERO;
-        this->acceleration_ = Vector3::ZERO;
-
-        this->server_position_ = Vector3::ZERO;
-        this->client_position_ = Vector3::ZERO;
-        this->server_velocity_ = Vector3::ZERO;
-        this->client_velocity_ = Vector3::ZERO;
-        this->server_orientation_ = Quaternion::IDENTITY;
-        this->client_orientation_ = Quaternion::IDENTITY;
-        
+        this->server_position_         = Vector3::ZERO;
+        this->client_position_         = Vector3::ZERO;
+        this->server_linear_velocity_  = Vector3::ZERO;
+        this->client_linear_velocity_  = Vector3::ZERO;
+        this->server_orientation_      = Quaternion::IDENTITY;
+        this->client_orientation_      = Quaternion::IDENTITY;
+        this->server_angular_velocity_ = Vector3::ZERO;
+        this->client_angular_velocity_ = Vector3::ZERO;
+
+
         this->setPriority( priority::very_high );
-
         this->registerVariables();
     }
@@ -229,20 +228,26 @@
     void ControllableEntity::tick(float dt)
     {
+        MobileEntity::tick(dt);
+
         if (this->isActive())
         {
-            this->velocity_ += (dt * this->acceleration_);
-            this->node_->translate(dt * this->velocity_, Ogre::Node::TS_LOCAL);
-
-            if (Core::isMaster())
+            // Check whether Bullet doesn't do the physics for us
+            if (!this->isDynamic())
             {
-                this->server_velocity_ = this->velocity_;
-                this->server_position_ = this->node_->getPosition();
+                if (Core::isMaster())
+                {
+                    this->server_position_ = this->getPosition();
+                    this->server_orientation_ = this->getOrientation();
+                    this->server_linear_velocity_ = this->getVelocity();
+                    this->server_angular_velocity_ = this->getAngularVelocity();
+                }
+                else if (this->bControlled_)
+                {
+                    this->client_position_ = this->getPosition();
+                    this->client_orientation_ = this->getOrientation();
+                    this->client_linear_velocity_ = this->getVelocity();
+                    this->client_angular_velocity_ = this->getAngularVelocity();
+                }
             }
-            else if (this->bControlled_)
-            {
-//                COUT(2) << "setting client position" << endl;
-                this->client_velocity_ = this->velocity_;
-                this->client_position_ = this->node_->getPosition();
-            }
         }
     }
@@ -251,18 +256,19 @@
     {
         registerVariable(this->cameraPositionTemplate_, variableDirection::toclient);
-  
-        registerVariable(this->client_overwrite_,   variableDirection::toserver);
-          
-        registerVariable(this->server_position_,    variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
-        registerVariable(this->server_velocity_,    variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));
-        registerVariable(this->server_orientation_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
-        registerVariable(this->server_overwrite_,   variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
-  
-        registerVariable(this->client_position_,    variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
-        registerVariable(this->client_velocity_,    variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));
-        registerVariable(this->client_orientation_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
-  
-  
-        registerVariable(this->playerID_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
+
+        registerVariable(this->server_position_,         variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
+        registerVariable(this->server_linear_velocity_,  variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerLinearVelocity));
+        registerVariable(this->server_orientation_,      variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
+        registerVariable(this->server_angular_velocity_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerAngularVelocity));
+
+        registerVariable(this->server_overwrite_,        variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
+        registerVariable(this->client_overwrite_,        variableDirection::toserver);
+
+        registerVariable(this->client_position_,         variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
+        registerVariable(this->client_linear_velocity_,  variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientLinearVelocity));
+        registerVariable(this->client_orientation_,      variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
+        registerVariable(this->client_angular_velocity_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientAngularVelocity));
+
+        registerVariable(this->playerID_,                variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
     }
 
@@ -270,11 +276,11 @@
     {
         if (!this->bControlled_)
-            this->node_->setPosition(this->server_position_);
-    }
-
-    void ControllableEntity::processServerVelocity()
+            this->setPosition(this->server_position_);
+    }
+
+    void ControllableEntity::processServerLinearVelocity()
     {
         if (!this->bControlled_)
-            this->velocity_ = this->server_velocity_;
+            this->setVelocity(this->server_linear_velocity_);
     }
 
@@ -282,5 +288,11 @@
     {
         if (!this->bControlled_)
-            this->node_->setOrientation(this->server_orientation_);
+            this->setOrientation(this->server_orientation_);
+    }
+
+    void ControllableEntity::processServerAngularVelocity()
+    {
+        if (!this->bControlled_)
+            this->setAngularVelocity(this->server_angular_velocity_);
     }
 
@@ -290,6 +302,7 @@
         {
             this->setPosition(this->server_position_);
-            this->setVelocity(this->server_velocity_);
             this->setOrientation(this->server_orientation_);
+            this->setVelocity(this->server_linear_velocity_);
+            this->setAngularVelocity(this->server_angular_velocity_);
 
             this->client_overwrite_ = this->server_overwrite_;
@@ -301,18 +314,17 @@
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-//            COUT(2) << "callback: setting client position" << endl;
-            this->node_->setPosition(this->client_position_);
-            this->server_position_ = this->client_position_;
-        }
-//        else
-//          COUT(2) << "callback: not setting client position" << endl;
-    }
-
-    void ControllableEntity::processClientVelocity()
+            this->setPosition(this->client_position_);
+            // The call above increments the overwrite. This is not desired to reduce traffic
+            --this->server_overwrite_;
+        }
+    }
+
+    void ControllableEntity::processClientLinearVelocity()
     {
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-            this->velocity_ = this->client_velocity_;
-            this->server_velocity_ = this->client_velocity_;
+            this->setVelocity(this->client_linear_velocity_);
+            // The call above increments the overwrite. This is not desired to reduce traffic
+            --this->server_overwrite_;
         }
     }
@@ -322,9 +334,19 @@
         if (this->server_overwrite_ == this->client_overwrite_)
         {
-            this->node_->setOrientation(this->client_orientation_);
-            this->server_orientation_ = this->client_orientation_;
-        }
-    }
-
+            this->setOrientation(this->client_orientation_);
+            // The call above increments the overwrite. This is not desired to reduce traffic
+            --this->server_overwrite_;
+        }
+    }
+
+    void ControllableEntity::processClientAngularVelocity()
+    {
+        if (this->server_overwrite_ == this->client_overwrite_)
+        {
+            this->setAngularVelocity(this->client_angular_velocity_);
+            // The call above increments the overwrite. This is not desired to reduce traffic
+            --this->server_overwrite_;
+        }
+    }
 
     void ControllableEntity::setPosition(const Vector3& position)
@@ -332,12 +354,27 @@
         if (Core::isMaster())
         {
-            this->node_->setPosition(position);
-            this->server_position_ = position;
+            MobileEntity::setPosition(position);
+            this->server_position_ = this->getPosition();
             ++this->server_overwrite_;
         }
         else if (this->bControlled_)
         {
-            this->node_->setPosition(position);
-            this->client_position_ = position;
+            MobileEntity::setPosition(position);
+            this->client_position_ = this->getPosition();
+        }
+    }
+
+    void ControllableEntity::setOrientation(const Quaternion& orientation)
+    {
+        if (Core::isMaster())
+        {
+            MobileEntity::setOrientation(orientation);
+            this->server_orientation_ = this->getOrientation();
+            ++this->server_overwrite_;
+        }
+        else if (this->bControlled_)
+        {
+            MobileEntity::setOrientation(orientation);
+            this->client_orientation_ = this->getOrientation();
         }
     }
@@ -347,132 +384,46 @@
         if (Core::isMaster())
         {
-            this->velocity_ = velocity;
-            this->server_velocity_ = velocity;
+            MobileEntity::setVelocity(velocity);
+            this->server_linear_velocity_ = this->getVelocity();
             ++this->server_overwrite_;
         }
         else if (this->bControlled_)
         {
-            this->velocity_ = velocity;
-            this->client_velocity_ = velocity;
-        }
-    }
-
-    void ControllableEntity::translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo)
+            MobileEntity::setVelocity(velocity);
+            this->client_linear_velocity_ = this->getVelocity();
+        }
+    }
+
+    void ControllableEntity::setAngularVelocity(const Vector3& velocity)
     {
         if (Core::isMaster())
         {
-            this->node_->translate(distance, relativeTo);
-            this->server_position_ = this->node_->getPosition();
+            MobileEntity::setAngularVelocity(velocity);
+            this->server_angular_velocity_ = this->getAngularVelocity();
             ++this->server_overwrite_;
         }
         else if (this->bControlled_)
         {
-            this->node_->translate(distance, relativeTo);
-            this->client_position_ = this->node_->getPosition();
-        }
-    }
-
-    void ControllableEntity::setOrientation(const Quaternion& orientation)
-    {
+            MobileEntity::setAngularVelocity(velocity);
+            this->client_angular_velocity_ = this->getAngularVelocity();
+        }
+    }
+
+    void ControllableEntity::setWorldTransform(const btTransform& worldTrans)
+    {
+        MobileEntity::setWorldTransform(worldTrans);
         if (Core::isMaster())
         {
-            this->node_->setOrientation(orientation);
-            this->server_orientation_ = orientation;
-            ++this->server_overwrite_;
+            this->server_position_ = this->getPosition();
+            this->server_orientation_ = this->getOrientation();
+            this->server_linear_velocity_ = this->getVelocity();
+            this->server_angular_velocity_ = this->getAngularVelocity();
         }
         else if (this->bControlled_)
         {
-            this->node_->setOrientation(orientation);
-            this->client_orientation_ = orientation;
-        }
-    }
-
-    void ControllableEntity::rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo)
-    {
-        if (Core::isMaster())
-        {
-            this->node_->rotate(rotation, relativeTo);
-            this->server_orientation_ = this->node_->getOrientation();
-            ++this->server_overwrite_;
-        }
-        else if (this->bControlled_)
-        {
-            this->node_->rotate(rotation, relativeTo);
-            this->client_orientation_ = this->node_->getOrientation();
-        }
-    }
-
-    void ControllableEntity::yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
-    {
-        if (Core::isMaster())
-        {
-            this->node_->yaw(angle, relativeTo);
-            this->server_orientation_ = this->node_->getOrientation();
-            ++this->server_overwrite_;
-        }
-        else if (this->bControlled_)
-        {
-            this->node_->yaw(angle, relativeTo);
-            this->client_orientation_ = this->node_->getOrientation();
-        }
-    }
-
-    void ControllableEntity::pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
-    {
-        if (Core::isMaster())
-        {
-            this->node_->pitch(angle, relativeTo);
-            this->server_orientation_ = this->node_->getOrientation();
-            ++this->server_overwrite_;
-        }
-        else if (this->bControlled_)
-        {
-            this->node_->pitch(angle, relativeTo);
-            this->client_orientation_ = this->node_->getOrientation();
-        }
-    }
-
-    void ControllableEntity::roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
-    {
-        if (Core::isMaster())
-        {
-            this->node_->roll(angle, relativeTo);
-            this->server_orientation_ = this->node_->getOrientation();
-            ++this->server_overwrite_;
-        }
-        else if (this->bControlled_)
-        {
-            this->node_->roll(angle, relativeTo);
-            this->client_orientation_ = this->node_->getOrientation();
-        }
-    }
-
-    void ControllableEntity::lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)
-    {
-        if (Core::isMaster())
-        {
-            this->node_->lookAt(target, relativeTo, localDirectionVector);
-            this->server_orientation_ = this->node_->getOrientation();
-            ++this->server_overwrite_;
-        }
-        else if (this->bControlled_)
-        {
-            this->node_->lookAt(target, relativeTo, localDirectionVector);
-            this->client_orientation_ = this->node_->getOrientation();
-        }
-    }
-
-    void ControllableEntity::setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)
-    {
-        if (Core::isMaster())
-        {
-            this->node_->setDirection(direction, relativeTo, localDirectionVector);
-            this->server_orientation_ = this->node_->getOrientation();
-            ++this->server_overwrite_;
-        }
-        else if (this->bControlled_)
-        {
-            this->node_->setDirection(direction, relativeTo, localDirectionVector);
-            this->client_orientation_ = this->node_->getOrientation();
+            this->client_position_ = this->getPosition();
+            this->client_orientation_ = this->getOrientation();
+            this->client_linear_velocity_ = this->getVelocity();
+            this->client_angular_velocity_ = this->getAngularVelocity();
         }
     }
Index: code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/ControllableEntity.h	(revision 2459)
@@ -23,5 +23,5 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Reto Grieder
  *
  */
@@ -32,10 +32,9 @@
 #include "OrxonoxPrereqs.h"
 
-#include "WorldEntity.h"
-#include "objects/Tickable.h"
+#include "MobileEntity.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport ControllableEntity : public WorldEntity, public Tickable
+    class _OrxonoxExport ControllableEntity : public MobileEntity
     {
         public:
@@ -72,39 +71,6 @@
             virtual void switchCamera();
 
-            inline const Vector3& getVelocity() const
-                { return this->velocity_; }
-            inline const Vector3& getAcceleration() const
-                { return this->acceleration_; }
             inline const std::string& getHudTemplate() const
                 { return this->hudtemplate_; }
-
-            using WorldEntity::setPosition;
-            using WorldEntity::translate;
-            using WorldEntity::setOrientation;
-            using WorldEntity::rotate;
-            using WorldEntity::yaw;
-            using WorldEntity::pitch;
-            using WorldEntity::roll;
-            using WorldEntity::lookAt;
-            using WorldEntity::setDirection;
-
-            void setPosition(const Vector3& position);
-            void translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void setOrientation(const Quaternion& orientation);
-            void rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-            void setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-
-            void setVelocity(const Vector3& velocity);
-            inline void setVelocity(float x, float y, float z)
-                { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
-
-            inline void setAcceleration(const Vector3& acceleration)
-                { this->acceleration_ = acceleration; }
-            inline void setAcceleration(float x, float y, float z)
-                { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
 
             inline Camera* getCamera() const
@@ -123,4 +89,14 @@
                 { return this->cameraPositionTemplate_; }
 
+            using WorldEntity::setPosition;
+            using WorldEntity::setOrientation;
+            using MobileEntity::setVelocity;
+            using MobileEntity::setAngularVelocity;
+
+            void setPosition(const Vector3& position);
+            void setOrientation(const Quaternion& orientation);
+            void setVelocity(const Vector3& velocity);
+            void setAngularVelocity(const Vector3& velocity);
+
         protected:
             virtual void startLocalControl();
@@ -133,6 +109,4 @@
                 { return this->bControlled_; }
 
-            Vector3 acceleration_;
-
         private:
             void overwrite();
@@ -140,25 +114,30 @@
 
             void processServerPosition();
-            void processServerVelocity();
+            void processServerLinearVelocity();
             void processServerOrientation();
+            void processServerAngularVelocity();
 
             void processClientPosition();
-            void processClientVelocity();
+            void processClientLinearVelocity();
             void processClientOrientation();
+            void processClientAngularVelocity();
 
             void networkcallback_changedplayerID();
+
+            // Bullet btMotionState related
+            void setWorldTransform(const btTransform& worldTrans);
 
             unsigned int server_overwrite_;
             unsigned int client_overwrite_;
 
-            Vector3 velocity_;
-
             bool bControlled_;
             Vector3 server_position_;
             Vector3 client_position_;
-            Vector3 server_velocity_;
-            Vector3 client_velocity_;
+            Vector3 server_linear_velocity_;
+            Vector3 client_linear_velocity_;
             Quaternion server_orientation_;
             Quaternion client_orientation_;
+            Vector3 server_angular_velocity_;
+            Vector3 client_angular_velocity_;
 
             PlayerInfo* player_;
Index: code/branches/presentation/src/orxonox/objects/worldentities/Light.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Light.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Light.cc	(revision 2459)
@@ -47,5 +47,5 @@
     CreateFactory(Light);
 
-    Light::Light(BaseObject* creator) : PositionableEntity(creator)
+    Light::Light(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(Light);
@@ -53,5 +53,5 @@
         if (this->getScene() && this->getScene()->getSceneManager())
         this->light_ = this->getScene()->getSceneManager()->createLight("Light" + convertToString(Light::lightCounter_s++));
-        this->getNode()->attachObject(this->light_);
+        this->attachOgreObject(this->light_);
 
         this->registerVariables();
Index: code/branches/presentation/src/orxonox/objects/worldentities/Light.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Light.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Light.h	(revision 2459)
@@ -31,5 +31,5 @@
 
 #include "OrxonoxPrereqs.h"
-#include "PositionableEntity.h"
+#include "StaticEntity.h"
 
 #include <string>
@@ -40,5 +40,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport Light : public PositionableEntity
+    class _OrxonoxExport Light : public StaticEntity
     {
         public:
Index: code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.cc	(revision 2459)
@@ -0,0 +1,194 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      Martin Stypinski
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "MobileEntity.h"
+
+#include <OgreSceneNode.h>
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+#include "util/Debug.h"
+#include "util/MathConvert.h"
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "objects/Scene.h"
+
+namespace orxonox
+{
+    MobileEntity::MobileEntity(BaseObject* creator) : WorldEntity(creator)
+    {
+        RegisterObject(MobileEntity);
+
+        this->linearAcceleration_  = Vector3::ZERO;
+        this->linearVelocity_      = Vector3::ZERO;
+        this->angularAcceleration_ = Vector3::ZERO;
+        this->angularVelocity_     = Vector3::ZERO;
+    }
+
+    MobileEntity::~MobileEntity()
+    {
+    }
+
+    void MobileEntity::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(MobileEntity, XMLPort, xmlelement, mode);
+
+        XMLPortParamTemplate(MobileEntity, "velocity",     setVelocity,     getVelocity,     xmlelement, mode, const Vector3&);
+        XMLPortParamTemplate(MobileEntity, "rotationaxis", setRotationAxis, getRotationAxis, xmlelement, mode, const Vector3&);
+        XMLPortParam(MobileEntity, "rotationrate", setRotationRate, getRotationRate, xmlelement, mode);
+    }
+
+    void MobileEntity::tick(float dt)
+    {
+        if (this->isActive())
+        {
+            // Check whether Bullet doesn't do the physics for us
+            if (!this->isDynamic())
+            {
+                // Linear part
+                this->linearVelocity_.x += this->linearAcceleration_.x * dt;
+                this->linearVelocity_.y += this->linearAcceleration_.y * dt;
+                this->linearVelocity_.z += this->linearAcceleration_.z * dt;
+                this->node_->translate(this->linearVelocity_ * dt);
+
+                // Angular part
+                // Note: angularVelocity_ is a Quaternion with w = 0 while angularAcceleration_ is a Vector3
+                this->angularVelocity_.x += angularAcceleration_.x * dt;
+                this->angularVelocity_.y += angularAcceleration_.y * dt;
+                this->angularVelocity_.z += angularAcceleration_.z * dt;
+                // Calculate new orientation with quaternion derivative. This is about 30% faster than with angle/axis method.
+                float mult = dt * 0.5;
+                // TODO: this could be optimized by writing it out. The calls currently create 4 new Quaternions!
+                Quaternion newOrientation(0.0f, this->angularVelocity_.x * mult, this->angularVelocity_.y * mult, this->angularVelocity_.z * mult);
+                newOrientation = this->node_->getOrientation() + newOrientation * this->node_->getOrientation();
+                newOrientation.normalise();
+                this->node_->setOrientation(newOrientation);
+            }
+        }
+    }
+
+    void MobileEntity::setPosition(const Vector3& position)
+    {
+        if (this->isDynamic())
+        {
+            btTransform transf = this->physicalBody_->getWorldTransform();
+            transf.setOrigin(btVector3(position.x, position.y, position.z));
+            this->physicalBody_->setWorldTransform(transf);
+        }
+
+        this->node_->setPosition(position);
+    }
+
+    void MobileEntity::setOrientation(const Quaternion& orientation)
+    {
+        if (this->isDynamic())
+        {
+            btTransform transf = this->physicalBody_->getWorldTransform();
+            transf.setRotation(btQuaternion(orientation.x, orientation.y, orientation.z, orientation.w));
+            this->physicalBody_->setWorldTransform(transf);
+        }
+
+        this->node_->setOrientation(orientation);
+    }
+
+    void MobileEntity::setVelocity(const Vector3& velocity)
+    {
+        if (this->isDynamic())
+            this->physicalBody_->setLinearVelocity(btVector3(velocity.x, velocity.y, velocity.z));
+
+        this->linearVelocity_ = velocity;
+    }
+
+    void MobileEntity::setAngularVelocity(const Vector3& velocity)
+    {
+        if (this->isDynamic())
+            this->physicalBody_->setAngularVelocity(btVector3(velocity.x, velocity.y, velocity.z));
+
+        this->angularVelocity_ = velocity;
+    }
+
+    void MobileEntity::setAcceleration(const Vector3& acceleration)
+    {
+        if (this->isDynamic())
+            this->physicalBody_->applyCentralForce(btVector3(acceleration.x * this->getMass(), acceleration.y * this->getMass(), acceleration.z * this->getMass()));
+
+        this->linearAcceleration_ = acceleration;
+    }
+
+    void MobileEntity::setAngularAcceleration(const Vector3& acceleration)
+    {
+        if (this->isDynamic())
+        {
+            btVector3 inertia(btVector3(1, 1, 1) / this->physicalBody_->getInvInertiaDiagLocal());
+            this->physicalBody_->applyTorque(btVector3(acceleration.x, acceleration.y, acceleration.z) * inertia);
+        }
+
+        this->angularAcceleration_ = acceleration;
+    }
+
+    bool MobileEntity::isCollisionTypeLegal(WorldEntity::CollisionType type) const
+    {
+        if (type == WorldEntity::Static)
+        {
+            CCOUT(1) << "Error: Cannot tell a MobileEntity to have static collision type! Ignoring." << std::endl;
+            assert(false); // Only in debug mode
+            return false;
+        }
+        else
+            return true;
+    }
+
+    void MobileEntity::setWorldTransform(const btTransform& worldTrans)
+    {
+        // We use a dynamic body. So we translate our node accordingly.
+        this->node_->setPosition(Vector3(worldTrans.getOrigin().x(), worldTrans.getOrigin().y(), worldTrans.getOrigin().z()));
+        this->node_->setOrientation(Quaternion(worldTrans.getRotation().w(), worldTrans.getRotation().x(), worldTrans.getRotation().y(), worldTrans.getRotation().z()));
+        this->linearVelocity_.x = this->physicalBody_->getLinearVelocity().x();
+        this->linearVelocity_.y = this->physicalBody_->getLinearVelocity().y();
+        this->linearVelocity_.z = this->physicalBody_->getLinearVelocity().z();
+        this->angularVelocity_.x = this->physicalBody_->getAngularVelocity().x();
+        this->angularVelocity_.y = this->physicalBody_->getAngularVelocity().y();
+        this->angularVelocity_.z = this->physicalBody_->getAngularVelocity().z();
+    }
+
+    void MobileEntity::getWorldTransform(btTransform& worldTrans) const
+    {
+        // We use a kinematic body
+        worldTrans.setOrigin(btVector3(node_->getPosition().x, node_->getPosition().y, node_->getPosition().z));
+        worldTrans.setRotation(btQuaternion(node_->getOrientation().x, node_->getOrientation().y, node_->getOrientation().z, node_->getOrientation().w));
+        if (this->isDynamic())
+        {
+            // This function gets called only once for dynamic objects to set the initial conditions
+            // We have to set the velocities too.
+            this->physicalBody_->setLinearVelocity(btVector3(linearVelocity_.x, linearVelocity_.y, linearVelocity_.z));
+            this->physicalBody_->setAngularVelocity(btVector3(angularVelocity_.x, angularVelocity_.y, angularVelocity_.z));
+        }
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.h	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/worldentities/MobileEntity.h	(revision 2459)
@@ -0,0 +1,100 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      Martin Stypinski
+ *
+ */
+
+#ifndef _MobileEntity_H__
+#define _MobileEntity_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "objects/Tickable.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport MobileEntity : public WorldEntity, public Tickable
+    {
+        public:
+            MobileEntity(BaseObject* creator);
+            virtual ~MobileEntity();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+
+            virtual void setPosition(const Vector3& position);
+            virtual void setOrientation(const Quaternion& orientation);
+
+            virtual void setVelocity(const Vector3& velocity);
+            inline void setVelocity(float x, float y, float z)
+                { this->setVelocity(Vector3(x, y, z)); }
+            inline const Vector3& getVelocity() const
+                { return this->linearVelocity_; }
+
+            virtual void setAngularVelocity(const Vector3& velocity);
+            inline void setAngularVelocity(float x, float y, float z)
+                { this->setAngularVelocity(Vector3(x, y, z)); }
+            inline const Vector3& getAngularVelocity() const
+                { return this->linearAcceleration_; }
+
+            void setAcceleration(const Vector3& acceleration);
+            inline void setAcceleration(float x, float y, float z)
+                { this->setAcceleration(Vector3(x, y, z)); }
+            inline const Vector3& getAcceleration() const
+                { return this->linearAcceleration_; }
+
+            void setAngularAcceleration(const Vector3& acceleration);
+            inline void setAngularAcceleration(float x, float y, float z)
+                { this->setAngularAcceleration(Vector3(x, y, z)); }
+            inline const Vector3& getAngularAcceleration() const
+                { return this->angularAcceleration_; }
+
+            inline void setRotationRate(Degree rate)
+                { this->setAngularVelocity(this->getAngularVelocity().normalisedCopy() * rate.valueRadians()); }
+            inline Degree getRotationRate() const
+                { return Degree(this->getAngularVelocity().length()); }
+
+            inline void setRotationAxis(const Vector3& axis)
+                { this->setAngularVelocity(axis * this->getAngularVelocity().length()); }
+            inline Vector3 getRotationAxis() const
+                { return this->getAngularVelocity().normalisedCopy(); }
+
+        protected:
+            // Bullet btMotionState related
+            virtual void setWorldTransform(const btTransform& worldTrans);
+            void getWorldTransform(btTransform& worldTrans) const;
+
+            Vector3 linearAcceleration_;
+            Vector3 linearVelocity_;
+            Vector3 angularAcceleration_;
+            Vector3 angularVelocity_;
+
+        private:
+            virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const;
+    };
+}
+
+#endif /* _MobileEntity_H__ */
Index: code/branches/presentation/src/orxonox/objects/worldentities/Model.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Model.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Model.cc	(revision 2459)
@@ -29,4 +29,5 @@
 #include "OrxonoxStableHeaders.h"
 
+#include <OgreEntity.h>
 #include "Model.h"
 #include "core/CoreIncludes.h"
@@ -38,5 +39,5 @@
     CreateFactory(Model);
 
-    Model::Model(BaseObject* creator) : PositionableEntity(creator)
+    Model::Model(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(Model);
@@ -48,5 +49,5 @@
     {
         if (this->isInitialized() && this->mesh_.getEntity())
-            this->getNode()->detachObject(this->mesh_.getEntity());
+            this->detachOgreObject(this->mesh_.getEntity());
     }
 
@@ -68,5 +69,5 @@
     {
         if (this->mesh_.getEntity())
-            this->getNode()->detachObject(this->mesh_.getEntity());
+            this->detachOgreObject(this->mesh_.getEntity());
 
         this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
@@ -74,5 +75,5 @@
         if (this->mesh_.getEntity())
         {
-            this->getNode()->attachObject(this->mesh_.getEntity());
+            this->attachOgreObject(this->mesh_.getEntity());
             this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
             this->mesh_.setVisible(this->isVisible());
Index: code/branches/presentation/src/orxonox/objects/worldentities/Model.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Model.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Model.h	(revision 2459)
@@ -31,10 +31,10 @@
 
 #include "OrxonoxPrereqs.h"
-#include "PositionableEntity.h"
+#include "StaticEntity.h"
 #include "tools/Mesh.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Model : public PositionableEntity
+    class _OrxonoxExport Model : public StaticEntity
     {
         public:
@@ -70,3 +70,3 @@
 }
 
-#endif /* _PositionableEntity_H__ */
+#endif /* _Model_H__ */
Index: code/branches/presentation/src/orxonox/objects/worldentities/MovableEntity.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 2459)
@@ -22,4 +22,5 @@
  *   Author:
  *      Fabian 'x3n' Landau
+ *      Reto Grieder
  *   Co-authors:
  *      ...
@@ -38,21 +39,20 @@
 {
     static const float MAX_RESYNCHRONIZE_TIME = 3.0f;
+    static const float CONTINUOUS_SYNCHRONIZATION_TIME = 10.0f;
 
     CreateFactory(MovableEntity);
 
-    MovableEntity::MovableEntity(BaseObject* creator) : WorldEntity(creator)
+    MovableEntity::MovableEntity(BaseObject* creator) : MobileEntity(creator)
     {
         RegisterObject(MovableEntity);
 
-        this->velocity_ = Vector3::ZERO;
-        this->acceleration_ = Vector3::ZERO;
-        this->rotationAxis_ = Vector3::ZERO;
-        this->rotationRate_ = 0;
-        this->momentum_ = 0;
-
-        this->overwrite_position_ = Vector3::ZERO;
+        this->overwrite_position_    = Vector3::ZERO;
         this->overwrite_orientation_ = Quaternion::IDENTITY;
         
         this->setPriority( priority::low );
+
+        // Resynchronise every few seconds because we only work with velocities (no positions)
+        continuousResynchroTimer_ = new Timer<MovableEntity>(CONTINUOUS_SYNCHRONIZATION_TIME + rnd(-1, 1),
+                true, this, createExecutor(createFunctor(&MovableEntity::resynchronize)), false);
 
         this->registerVariables();
@@ -61,4 +61,6 @@
     MovableEntity::~MovableEntity()
     {
+        if (this->isInitialized())
+            delete this->continuousResynchroTimer_;
     }
 
@@ -66,46 +68,13 @@
     {
         SUPER(MovableEntity, XMLPort, xmlelement, mode);
-
-        XMLPortParamTemplate(MovableEntity, "velocity", setVelocity, getVelocity, xmlelement, mode, const Vector3&);
-        XMLPortParamTemplate(MovableEntity, "rotationaxis", setRotationAxis, getRotationAxis, xmlelement, mode, const Vector3&);
-        XMLPortParamTemplate(MovableEntity, "rotationrate", setRotationRate, getRotationRate, xmlelement, mode, const Degree&);
-    }
-
-    void MovableEntity::tick(float dt)
-    {
-        if (this->isActive())
-        {
-            this->velocity_ += (dt * this->acceleration_);
-            this->node_->translate(dt * this->velocity_);
-
-            this->rotationRate_ += (dt * this->momentum_);
-            this->node_->rotate(this->rotationAxis_, this->rotationRate_  * dt);
-        }
     }
 
     void MovableEntity::registerVariables()
     {
-        registerVariable(this->velocity_.x, variableDirection::toclient);
-        registerVariable(this->velocity_.y, variableDirection::toclient);
-        registerVariable(this->velocity_.z, variableDirection::toclient);
-  
-        registerVariable(this->rotationAxis_.x, variableDirection::toclient);
-        registerVariable(this->rotationAxis_.y, variableDirection::toclient);
-        registerVariable(this->rotationAxis_.z, variableDirection::toclient);
-  
-        registerVariable(this->rotationRate_, variableDirection::toclient);
-  
+        registerVariable(this->linearVelocity_,        variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processLinearVelocity));
+        registerVariable(this->angularVelocity_,       variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::processAngularVelocity));
+
         registerVariable(this->overwrite_position_,    variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
         registerVariable(this->overwrite_orientation_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
-    }
-
-    void MovableEntity::overwritePosition()
-    {
-        this->node_->setPosition(this->overwrite_position_);
-    }
-
-    void MovableEntity::overwriteOrientation()
-    {
-        this->node_->setOrientation(this->overwrite_orientation_);
     }
 
@@ -124,57 +93,3 @@
         this->overwrite_orientation_ = this->getOrientation();
     }
-
-    void MovableEntity::setPosition(const Vector3& position)
-    {
-        this->node_->setPosition(position);
-        this->overwrite_position_ = this->node_->getPosition();
-    }
-
-    void MovableEntity::translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo)
-    {
-        this->node_->translate(distance, relativeTo);
-        this->overwrite_position_ = this->node_->getPosition();
-    }
-
-    void MovableEntity::setOrientation(const Quaternion& orientation)
-    {
-        this->node_->setOrientation(orientation);
-        this->overwrite_orientation_ = this->node_->getOrientation();
-    }
-
-    void MovableEntity::rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo)
-    {
-        this->node_->rotate(rotation, relativeTo);
-        this->overwrite_orientation_ = this->node_->getOrientation();
-    }
-
-    void MovableEntity::yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
-    {
-        this->node_->yaw(angle, relativeTo);
-        this->overwrite_orientation_ = this->node_->getOrientation();
-    }
-
-    void MovableEntity::pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
-    {
-        this->node_->pitch(angle, relativeTo);
-        this->overwrite_orientation_ = this->node_->getOrientation();
-    }
-
-    void MovableEntity::roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo)
-    {
-        this->node_->roll(angle, relativeTo);
-        this->overwrite_orientation_ = this->node_->getOrientation();
-    }
-
-    void MovableEntity::lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)
-    {
-        this->node_->lookAt(target, relativeTo, localDirectionVector);
-        this->overwrite_orientation_ = this->node_->getOrientation();
-    }
-
-    void MovableEntity::setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)
-    {
-        this->node_->setDirection(direction, relativeTo, localDirectionVector);
-        this->overwrite_orientation_ = this->node_->getOrientation();
-    }
 }
Index: code/branches/presentation/src/orxonox/objects/worldentities/MovableEntity.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/MovableEntity.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/MovableEntity.h	(revision 2459)
@@ -22,4 +22,5 @@
  *   Author:
  *      Fabian 'x3n' Landau
+ *      Reto Grieder
  *   Co-authors:
  *      ...
@@ -32,11 +33,10 @@
 #include "OrxonoxPrereqs.h"
 
-#include "WorldEntity.h"
-#include "objects/Tickable.h"
+#include "MobileEntity.h"
 #include "network/ClientConnectionListener.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport MovableEntity : public WorldEntity, public Tickable, public ClientConnectionListener
+    class _OrxonoxExport MovableEntity : public MobileEntity, public ClientConnectionListener
     {
         public:
@@ -45,61 +45,13 @@
 
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void tick(float dt);
             void registerVariables();
 
             using WorldEntity::setPosition;
-            using WorldEntity::translate;
             using WorldEntity::setOrientation;
-            using WorldEntity::rotate;
-            using WorldEntity::yaw;
-            using WorldEntity::pitch;
-            using WorldEntity::roll;
-            using WorldEntity::lookAt;
-            using WorldEntity::setDirection;
 
-            void setPosition(const Vector3& position);
-            void translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void setOrientation(const Quaternion& orientation);
-            void rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL);
-            void lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-            void setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
-
-            inline void setVelocity(const Vector3& velocity)
-                { this->velocity_ = velocity; }
-            inline void setVelocity(float x, float y, float z)
-                { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
-            inline const Vector3& getVelocity() const
-                { return this->velocity_; }
-
-            inline void setAcceleration(const Vector3& acceleration)
-                { this->acceleration_ = acceleration; }
-            inline void setAcceleration(float x, float y, float z)
-                { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
-            inline const Vector3& getAcceleration() const
-                { return this->acceleration_; }
-
-            inline void setRotationAxis(const Vector3& axis)
-                { this->rotationAxis_ = axis; this->rotationAxis_.normalise(); }
-            inline void setRotationAxis(float x, float y, float z)
-                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; rotationAxis_.normalise(); }
-            inline const Vector3& getRotationAxis() const
-                { return this->rotationAxis_; }
-
-            inline void setRotationRate(const Degree& angle)
-                { this->rotationRate_ = angle; }
-            inline void setRotationRate(const Radian& angle)
-                { this->rotationRate_ = angle; }
-            inline const Degree& getRotationRate() const
-                { return this->rotationRate_; }
-
-            inline void setMomentum(const Degree& angle)
-                { this->momentum_ = angle; }
-            inline void setMomentum(const Radian& angle)
-                { this->momentum_ = angle; }
-            inline const Degree& getMomentum() const
-                { return this->momentum_; }
+            inline void setPosition(const Vector3& position)
+                { MobileEntity::setPosition(position); this->overwrite_position_ = this->getPosition(); }
+            inline void setOrientation(const Quaternion& orientation)
+                { MobileEntity::setOrientation(orientation); this->overwrite_orientation_ = this->getOrientation(); }
 
         private:
@@ -108,15 +60,17 @@
             void resynchronize();
 
-            void overwritePosition();
-            void overwriteOrientation();
+            inline void processLinearVelocity()
+                { this->setVelocity(this->linearVelocity_); }
+            inline void processAngularVelocity()
+                { this->setAngularVelocity(this->angularVelocity_); }
 
-            Vector3 velocity_;
-            Vector3 acceleration_;
-            Vector3 rotationAxis_;
-            Degree rotationRate_;
-            Degree momentum_;
+            inline void overwritePosition()
+                { this->setPosition(this->overwrite_position_); }
+            inline void overwriteOrientation()
+                { this->setOrientation(this->overwrite_orientation_); }
 
-            Vector3 overwrite_position_;
+            Vector3    overwrite_position_;
             Quaternion overwrite_orientation_;
+            Timer<MovableEntity>* continuousResynchroTimer_;
     };
 }
Index: code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.cc	(revision 2459)
@@ -33,6 +33,7 @@
 
 #include "OrxonoxStableHeaders.h"
+#include "ParticleEmitter.h"
 
-#include "ParticleEmitter.h"
+#include <OgreParticleSystem.h>
 
 #include "tools/ParticleInterface.h"
@@ -46,5 +47,5 @@
     CreateFactory(ParticleEmitter);
 
-    ParticleEmitter::ParticleEmitter(BaseObject* creator) : PositionableEntity(creator)
+    ParticleEmitter::ParticleEmitter(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(ParticleEmitter);
@@ -62,5 +63,8 @@
     {
         if (this->isInitialized() && this->particles_)
+        {
+            this->detachOgreObject(this->particles_->getParticleSystem());
             delete this->particles_;
+        }
     }
 
@@ -105,5 +109,5 @@
             {
                 this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), this->source_, this->LOD_);
-                this->particles_->addToSceneNode(this->getNode());
+                this->attachOgreObject(particles_->getParticleSystem());
                 this->particles_->setVisible(this->isVisible());
                 this->particles_->setEnabled(this->isActive());
Index: code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.h	(revision 2459)
@@ -31,9 +31,9 @@
 
 #include "OrxonoxPrereqs.h"
-#include "PositionableEntity.h"
+#include "StaticEntity.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport ParticleEmitter : public PositionableEntity
+    class _OrxonoxExport ParticleEmitter : public StaticEntity
     {
         public:
Index: code/branches/presentation/src/orxonox/objects/worldentities/Planet.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Planet.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Planet.cc	(revision 2459)
@@ -33,5 +33,5 @@
 
 #include <OgreEntity.h>
-#include <OgreMesh.h>
+#include <OgreBillboardSet.h>
 #include <OgreHardwareVertexBuffer.h>
 #include <OgreMeshManager.h>
@@ -63,5 +63,5 @@
     {
         if (this->isInitialized() && this->mesh_.getEntity())
-            this->getNode()->detachObject(this->mesh_.getEntity());
+            this->detachOgreObject(this->mesh_.getEntity());
     }    
 
@@ -108,5 +108,5 @@
         billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
 
-        this->getNode()->attachObject(this->billboard_.getBillboardSet());    
+        this->attachOgreObject(this->billboard_.getBillboardSet());    
         this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
         this->setCastShadows(true);
@@ -118,5 +118,5 @@
     {
         if (this->mesh_.getEntity())
-            this->getNode()->detachObject(this->mesh_.getEntity());
+            this->detachOgreObject(this->mesh_.getEntity());
 
         this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
@@ -124,5 +124,5 @@
         if (this->mesh_.getEntity())
         {
-            this->getNode()->attachObject(this->mesh_.getEntity());
+            this->attachOgreObject(this->mesh_.getEntity());
             this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
             this->mesh_.setVisible(this->isVisible());
Index: code/branches/presentation/src/orxonox/objects/worldentities/Planet.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/Planet.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/Planet.h	(revision 2459)
@@ -31,4 +31,6 @@
 
 #include "OrxonoxPrereqs.h"
+
+#include <OgreMesh.h>
 
 #include "tools/BillboardSet.h"
Index: code/branches/presentation/src/orxonox/objects/worldentities/PositionableEntity.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/PositionableEntity.cc	(revision 2436)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#include "OrxonoxStableHeaders.h"
-#include "PositionableEntity.h"
-#include "core/CoreIncludes.h"
-
-namespace orxonox
-{
-    CreateFactory(PositionableEntity);
-
-    PositionableEntity::PositionableEntity(BaseObject* creator) : WorldEntity(creator)
-    {
-        RegisterObject(PositionableEntity);
-        
-        this->setPriority( priority::very_low );
-
-        this->registerVariables();
-    }
-
-    PositionableEntity::~PositionableEntity()
-    {
-    }
-
-    void PositionableEntity::registerVariables()
-    {
-        registerVariable(this->getPosition().x, variableDirection::toclient);
-        registerVariable(this->getPosition().y, variableDirection::toclient);
-        registerVariable(this->getPosition().z, variableDirection::toclient);
-
-        registerVariable(this->getOrientation().w, variableDirection::toclient);
-        registerVariable(this->getOrientation().x, variableDirection::toclient);
-        registerVariable(this->getOrientation().y, variableDirection::toclient);
-        registerVariable(this->getOrientation().z, variableDirection::toclient);
-    }
-}
Index: code/branches/presentation/src/orxonox/objects/worldentities/PositionableEntity.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/PositionableEntity.h	(revision 2436)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/*
- *   ORXONOX - the hottest 3D action shooter ever to exist
- *                    > www.orxonox.net <
- *
- *
- *   License notice:
- *
- *   This program is free software; you can redistribute it and/or
- *   modify it under the terms of the GNU General Public License
- *   as published by the Free Software Foundation; either version 2
- *   of the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- *
- *   Author:
- *      Fabian 'x3n' Landau
- *   Co-authors:
- *      ...
- *
- */
-
-#ifndef _PositionableEntity_H__
-#define _PositionableEntity_H__
-
-#include "OrxonoxPrereqs.h"
-#include "WorldEntity.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PositionableEntity : public WorldEntity
-    {
-        public:
-            PositionableEntity(BaseObject* creator);
-            virtual ~PositionableEntity();
-
-            void registerVariables();
-
-            using WorldEntity::setPosition;
-            using WorldEntity::translate;
-            using WorldEntity::setOrientation;
-            using WorldEntity::rotate;
-            using WorldEntity::yaw;
-            using WorldEntity::pitch;
-            using WorldEntity::roll;
-            using WorldEntity::lookAt;
-            using WorldEntity::setDirection;
-
-            inline void setPosition(const Vector3& position)
-                { this->node_->setPosition(position); }
-            inline void translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->node_->translate(distance, relativeTo); }
-            inline void setOrientation(const Quaternion& orientation)
-                { this->node_->setOrientation(orientation); }
-            inline void rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->node_->rotate(rotation, relativeTo); }
-            inline void yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->node_->yaw(angle, relativeTo); }
-            inline void pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->node_->pitch(angle, relativeTo); }
-            inline void roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->node_->roll(angle, relativeTo); }
-            inline void lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
-                { this->node_->lookAt(target, relativeTo, localDirectionVector); }
-            inline void setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
-                { this->node_->setDirection(direction, relativeTo, localDirectionVector); }
-    };
-}
-
-#endif /* _PositionableEntity_H__ */
Index: code/branches/presentation/src/orxonox/objects/worldentities/SpawnPoint.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/SpawnPoint.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/SpawnPoint.cc	(revision 2459)
@@ -38,5 +38,5 @@
     CreateFactory(SpawnPoint);
 
-    SpawnPoint::SpawnPoint(BaseObject* creator) : PositionableEntity(creator)
+    SpawnPoint::SpawnPoint(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(SpawnPoint);
Index: code/branches/presentation/src/orxonox/objects/worldentities/SpawnPoint.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/SpawnPoint.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/SpawnPoint.h	(revision 2459)
@@ -34,10 +34,10 @@
 #include "core/Identifier.h"
 #include "core/Template.h"
-#include "PositionableEntity.h"
 #include "objects/worldentities/pawns/Pawn.h"
+#include "objects/worldentities/StaticEntity.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport SpawnPoint : public PositionableEntity
+    class _OrxonoxExport SpawnPoint : public StaticEntity
     {
         public:
Index: code/branches/presentation/src/orxonox/objects/worldentities/StaticEntity.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/worldentities/StaticEntity.cc	(revision 2459)
@@ -0,0 +1,119 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder (physics)
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "StaticEntity.h"
+
+#include <OgreSceneNode.h>
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(StaticEntity);
+
+    StaticEntity::StaticEntity(BaseObject* creator) : WorldEntity(creator)
+    {
+        RegisterObject(StaticEntity);
+        
+        this->setPriority(priority::very_low);
+
+        this->registerVariables();
+    }
+
+    StaticEntity::~StaticEntity()
+    {
+    }
+
+    void StaticEntity::registerVariables()
+    {
+        registerVariable(this->getPosition(),    variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::positionChanged));
+        registerVariable(this->getOrientation(), variableDirection::toclient, new NetworkCallback<StaticEntity>(this, &StaticEntity::orientationChanged));
+    }
+
+
+    void StaticEntity::setPosition(const Vector3& position)
+    {
+        if (this->addedToPhysicalWorld())
+        {
+            CCOUT(2) << "Warning: Attempting to change the position of a StaticEntity at physics run time. Ignoring change." << std::endl;
+            return;
+        }
+        if (this->isStatic())
+        {
+            btTransform transf = this->physicalBody_->getWorldTransform();
+            transf.setOrigin(btVector3(position.x, position.y, position.z));
+            this->physicalBody_->setWorldTransform(transf);
+        }
+
+        this->node_->setPosition(position);
+    }
+
+    void StaticEntity::setOrientation(const Quaternion& orientation)
+    {
+        if (this->addedToPhysicalWorld())
+        {
+            CCOUT(2) << "Warning: Attempting to change the orientation of a StaticEntity at physics run time. Ignoring change." << std::endl;
+            return;
+        }
+        if (this->isStatic())
+        {
+            btTransform transf = this->physicalBody_->getWorldTransform();
+            transf.setRotation(btQuaternion(orientation.x, orientation.y, orientation.z, orientation.w));
+            this->physicalBody_->setWorldTransform(transf);
+        }
+
+        this->node_->setOrientation(orientation);
+    }
+
+    bool StaticEntity::isCollisionTypeLegal(WorldEntity::CollisionType type) const
+    {
+        if (type == WorldEntity::Kinematic || type == WorldEntity::Dynamic)
+        {
+            CCOUT(1) << "Error: Cannot tell a StaticEntity to have kinematic or dynamic collision type! Ignoring." << std::endl;
+            assert(false); // Only in debug mode
+            return false;
+        }
+        else
+            return true;
+    }
+
+    void StaticEntity::setWorldTransform(const btTransform& worldTrans)
+    {
+        OrxAssert(false, "Setting world transform of a StaticEntity, which is CF_STATIC!");
+    }
+
+    void StaticEntity::getWorldTransform(btTransform& worldTrans) const
+    {
+        worldTrans.setOrigin(btVector3(node_->getPosition().x, node_->getPosition().y, node_->getPosition().z));
+        worldTrans.setRotation(btQuaternion(node_->getOrientation().x, node_->getOrientation().y, node_->getOrientation().z, node_->getOrientation().w));
+    }
+}
Index: code/branches/presentation/src/orxonox/objects/worldentities/StaticEntity.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/StaticEntity.h	(revision 2459)
+++ code/branches/presentation/src/orxonox/objects/worldentities/StaticEntity.h	(revision 2459)
@@ -0,0 +1,67 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _StaticEntity_H__
+#define _StaticEntity_H__
+
+#include "OrxonoxPrereqs.h"
+#include "WorldEntity.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport StaticEntity : public WorldEntity
+    {
+        public:
+            StaticEntity(BaseObject* creator);
+            virtual ~StaticEntity();
+
+            void registerVariables();
+
+            using WorldEntity::setPosition;
+            using WorldEntity::setOrientation;
+
+            void setPosition(const Vector3& position);
+            void setOrientation(const Quaternion& orientation);
+
+        private:
+            bool isCollisionTypeLegal(CollisionType type) const;
+
+            // network callbacks
+            inline void positionChanged()
+                { this->setPosition(this->getPosition()); }
+            inline void orientationChanged()
+                { this->setOrientation(this->getOrientation()); }
+
+            // Bullet btMotionState related
+            void setWorldTransform(const btTransform& worldTrans);
+            void getWorldTransform(btTransform& worldTrans) const;
+    };
+}
+
+#endif /* _StaticEntity_H__ */
Index: code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.cc	(revision 2459)
@@ -22,4 +22,5 @@
  *   Author:
  *      Fabian 'x3n' Landau
+ *      Reto Grieder (physics)
  *   Co-authors:
  *      ...
@@ -31,12 +32,15 @@
 
 #include <cassert>
+#include <OgreSceneNode.h>
 #include <OgreSceneManager.h>
-
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+#include "util/Exception.h"
+#include "util/Convert.h"
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Convert.h"
-#include "util/Exception.h"
 
 #include "objects/Scene.h"
+#include "objects/collisionshapes/CompoundCollisionShape.h"
 
 namespace orxonox
@@ -64,4 +68,19 @@
         this->node_->setOrientation(Quaternion::IDENTITY);
 
+        // Default behaviour does not include physics
+        this->physicalBody_ = 0;
+        this->bPhysicsActive_ = false;
+        this->collisionShape_ = new CompoundCollisionShape(this);
+        this->collisionType_ = None;
+        this->collisionTypeSynchronised_ = None;
+        this->mass_           = 0;
+        this->childrenMass_   = 0;
+        // Use bullet default values
+        this->restitution_    = 0;
+        this->angularFactor_  = 1;
+        this->linearDamping_  = 0;
+        this->angularDamping_ = 0;
+        this->friction_       = 0.5;
+
         this->registerVariables();
     }
@@ -74,4 +93,13 @@
             if (this->getScene()->getSceneManager())
                 this->getScene()->getSceneManager()->destroySceneNode(this->node_->getName());
+
+            // TODO: Detach from parent and detach all children.
+
+            if (this->physicalBody_)
+            {
+                this->deactivatePhysics();
+                delete this->physicalBody_;
+            }
+            delete this->collisionShape_;
         }
     }
@@ -81,30 +109,51 @@
         SUPER(WorldEntity, XMLPort, xmlelement, mode);
 
-        XMLPortParamTemplate(WorldEntity, "position", setPosition, getPosition, xmlelement, mode, const Vector3&);
+        XMLPortParamTemplate(WorldEntity, "position",    setPosition,    getPosition,    xmlelement, mode, const Vector3&);
         XMLPortParamTemplate(WorldEntity, "orientation", setOrientation, getOrientation, xmlelement, mode, const Quaternion&);
-        XMLPortParamLoadOnly(WorldEntity, "lookat", lookAt_xmlport, xmlelement, mode);
-        XMLPortParamLoadOnly(WorldEntity, "direction", setDirection_xmlport, xmlelement, mode);
-        XMLPortParamLoadOnly(WorldEntity, "yaw", yaw_xmlport, xmlelement, mode);
-        XMLPortParamLoadOnly(WorldEntity, "pitch", pitch_xmlport, xmlelement, mode);
-        XMLPortParamLoadOnly(WorldEntity, "roll", roll_xmlport, xmlelement, mode);
-        XMLPortParamTemplate(WorldEntity, "scale3D", setScale3D, getScale3D, xmlelement, mode, const Vector3&);
-        XMLPortParam(WorldEntity, "scale", setScale, getScale, xmlelement, mode);
-
+        XMLPortParamTemplate(WorldEntity, "scale3D",     setScale3D,     getScale3D,     xmlelement, mode, const Vector3&);
+        XMLPortParam        (WorldEntity, "scale",       setScale,       getScale,       xmlelement, mode);
+        XMLPortParamLoadOnly(WorldEntity, "lookat",      lookAt_xmlport,       xmlelement, mode);
+        XMLPortParamLoadOnly(WorldEntity, "direction",   setDirection_xmlport, xmlelement, mode);
+        XMLPortParamLoadOnly(WorldEntity, "yaw",         yaw_xmlport,          xmlelement, mode);
+        XMLPortParamLoadOnly(WorldEntity, "pitch",       pitch_xmlport,        xmlelement, mode);
+        XMLPortParamLoadOnly(WorldEntity, "roll",        roll_xmlport,         xmlelement, mode);
+
+        // Physics
+        XMLPortParam(WorldEntity, "collisionType",  setCollisionTypeStr, getCollisionTypeStr, xmlelement, mode);
+        XMLPortParam(WorldEntity, "mass",           setMass,             getMass,             xmlelement, mode);
+        XMLPortParam(WorldEntity, "restitution",    setRestitution,      getRestitution,      xmlelement, mode);
+        XMLPortParam(WorldEntity, "angularFactor",  setAngularFactor,    getAngularFactor,    xmlelement, mode);
+        XMLPortParam(WorldEntity, "linearDamping",  setLinearDamping,    getLinearDamping,    xmlelement, mode);
+        XMLPortParam(WorldEntity, "angularDamping", setAngularDamping,   getAngularDamping,   xmlelement, mode);
+        XMLPortParam(WorldEntity, "friction",       setFriction,         getFriction,         xmlelement, mode);
+
+        // Other attached WorldEntities
         XMLPortObject(WorldEntity, WorldEntity, "attached", attach, getAttachedObject, xmlelement, mode);
+        // Attached collision shapes
+        XMLPortObject(WorldEntity, CollisionShape, "collisionShapes", attachCollisionShape, getAttachedCollisionShape, xmlelement, mode);
     }
 
     void WorldEntity::registerVariables()
     {
-        registerVariable(this->bActive_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
-        registerVariable(this->bVisible_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
-  
-        registerVariable(this->getScale3D().x, variableDirection::toclient);
-        registerVariable(this->getScale3D().y, variableDirection::toclient);
-        registerVariable(this->getScale3D().z, variableDirection::toclient);
-  
-        registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));
-    }
-
-    void WorldEntity::updateParent()
+        registerVariable(this->bActive_,        variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
+        registerVariable(this->bVisible_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
+
+        registerVariable(this->getScale3D(),    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::scaleChanged));
+
+        registerVariable((int&)this->collisionTypeSynchronised_,
+                                                variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionTypeChanged));
+        registerVariable(this->mass_,           variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::massChanged));
+        registerVariable(this->restitution_,    variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::restitutionChanged));
+        registerVariable(this->angularFactor_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularFactorChanged));
+        registerVariable(this->linearDamping_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::linearDampingChanged));
+        registerVariable(this->angularDamping_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
+        registerVariable(this->friction_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
+        registerVariable(this->bPhysicsActiveSynchronised_,
+                                                variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::physicsActivityChanged));
+
+        registerVariable(this->parentID_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::parentChanged));
+    }
+
+    void WorldEntity::parentChanged()
     {
         if (this->parentID_ != OBJECTID_UNKNOWN)
@@ -116,6 +165,61 @@
     }
 
+    void WorldEntity::collisionTypeChanged()
+    {
+        if (this->collisionTypeSynchronised_ != Dynamic &&
+            this->collisionTypeSynchronised_ != Kinematic &&
+            this->collisionTypeSynchronised_ != Static &&
+            this->collisionTypeSynchronised_ != None)
+        {
+            CCOUT(1) << "Error when collsion Type was received over network. Unknown enum value:" << this->collisionTypeSynchronised_ << std::endl;
+        }
+        else if (this->collisionTypeSynchronised_ != collisionType_)
+        {
+            if (this->parent_)
+                CCOUT(2) << "Warning: Network connection tried to set the collision type of an attached WE. Ignoring." << std::endl;
+            else
+                this->setCollisionType(this->collisionTypeSynchronised_);
+        }
+    }
+
+    void WorldEntity::physicsActivityChanged()
+    {
+        if (this->bPhysicsActiveSynchronised_)
+            this->activatePhysics();
+        else
+            this->deactivatePhysics();
+    }
+
     void WorldEntity::attach(WorldEntity* object)
     {
+        // check first whether attaching is even allowed
+        if (object->hasPhysics())
+        {
+            if (!this->hasPhysics())
+            {
+                COUT(2) << "Warning: Cannot attach a physical object to a non physical one." << std::endl;
+                return;
+            }
+            else if (object->isDynamic())
+            {
+                COUT(2) << "Warning: Cannot attach a dynamic object to a WorldEntity." << std::endl;
+                return;
+            }
+            else if (object->isKinematic() && this->isDynamic())
+            {
+                COUT(2) << "Warning: Cannot attach a kinematic object to a dynamic one." << std::endl;
+                return;
+            }
+            else if (object->isKinematic())
+            {
+                COUT(2) << "Warning: Cannot attach a kinematic object to a static or kinematic one: Not yet implemented." << std::endl;
+                return;
+            }
+            else
+            {
+                object->deactivatePhysics();
+            }
+        }
+
         if (object->getParent())
             object->detachFromParent();
@@ -131,14 +235,31 @@
         object->parent_ = this;
         object->parentID_ = this->getObjectID();
+
+        // collision shapes
+        this->attachCollisionShape(object->getCollisionShape());
+        // mass
+        this->childrenMass_ += object->getMass();
+        recalculateMassProps();
     }
 
     void WorldEntity::detach(WorldEntity* object)
     {
+        // collision shapes
+        this->detachCollisionShape(object->getCollisionShape());
+        // mass
+        if (object->getMass() > 0.0f)
+        {
+            this->childrenMass_ -= object->getMass();
+            recalculateMassProps();
+        }
+
         this->node_->removeChild(object->node_);
         this->children_.erase(object);
         object->parent_ = 0;
         object->parentID_ = OBJECTID_UNKNOWN;
-
 //        this->getScene()->getRootSceneNode()->addChild(object->node_);
+
+        // Note: It is possible that the object has physics but was disabled when attaching
+        object->activatePhysics();
     }
 
@@ -154,3 +275,368 @@
         return 0;
     }
+
+    void WorldEntity::attachOgreObject(Ogre::MovableObject* object)
+    {
+        this->node_->attachObject(object);
+    }
+
+    void WorldEntity::detachOgreObject(Ogre::MovableObject* object)
+    {
+        this->node_->detachObject(object);
+    }
+
+    Ogre::MovableObject* WorldEntity::detachOgreObject(const Ogre::String& name)
+    {
+        return this->node_->detachObject(name);
+    }
+
+    void WorldEntity::attachCollisionShape(CollisionShape* shape)
+    {
+        this->collisionShape_->addChildShape(shape);
+        // Note: this->collisionShape_ already notifies us of any changes.
+    }
+
+    void WorldEntity::detachCollisionShape(CollisionShape* shape)
+    {
+        this->collisionShape_->removeChildShape(shape);
+        // Note: this->collisionShape_ already notifies us of any changes.
+    }
+
+    CollisionShape* WorldEntity::getAttachedCollisionShape(unsigned int index) const
+    {
+        return this->collisionShape_->getChildShape(index);
+    }
+
+    void WorldEntity::activatePhysics()
+    {
+        if (this->isActive() && this->hasPhysics() && !this->isPhysicsActive() && !this->parent_)
+        {
+            this->getScene()->addPhysicalObject(this);
+            this->bPhysicsActive_ = true;
+        }
+    }
+
+    void WorldEntity::deactivatePhysics()
+    {
+        if (this->isPhysicsActive())
+        {
+            this->getScene()->removePhysicalObject(this);
+            this->bPhysicsActive_ = false;
+        }
+    }
+
+    bool WorldEntity::addedToPhysicalWorld() const
+    {
+        return this->physicalBody_ && this->physicalBody_->isInWorld();
+    }
+
+#ifndef _NDEBUG
+    const Vector3& WorldEntity::getPosition() const
+    {
+        return this->node_->getPosition();
+    }
+
+    const Quaternion& WorldEntity::getOrientation() const
+    {
+        return this->node_->getOrientation();
+    }
+
+    const Vector3& WorldEntity::getScale3D() const
+    {
+        return this->node_->getScale();
+    }
+#endif
+
+    const Vector3& WorldEntity::getWorldPosition() const
+    {
+        return this->node_->_getDerivedPosition();
+    }
+
+    const Quaternion& WorldEntity::getWorldOrientation() const
+    {
+        return this->node_->_getDerivedOrientation();
+    }
+
+    void WorldEntity::translate(const Vector3& distance, TransformSpace::Space relativeTo)
+    {
+        switch (relativeTo)
+        {
+        case TransformSpace::Local:
+            // position is relative to parent so transform downwards
+            this->setPosition(this->getPosition() + this->getOrientation() * distance);
+            break;
+        case TransformSpace::Parent:
+            this->setPosition(this->getPosition() + distance);
+            break;
+        case TransformSpace::World:
+            // position is relative to parent so transform upwards
+            if (this->node_->getParent())
+                setPosition(getPosition() + (node_->getParent()->_getDerivedOrientation().Inverse() * distance)
+                    / node_->getParent()->_getDerivedScale());
+            else
+                this->setPosition(this->getPosition() + distance);
+            break;
+        }
+    }
+
+    void WorldEntity::rotate(const Quaternion& rotation, TransformSpace::Space relativeTo)
+    {
+        switch(relativeTo)
+        {
+        case TransformSpace::Local:
+            this->setOrientation(this->getOrientation() * rotation);
+            break;
+        case TransformSpace::Parent:
+            // Rotations are normally relative to local axes, transform up
+            this->setOrientation(rotation * this->getOrientation());
+            break;
+        case TransformSpace::World:
+            // Rotations are normally relative to local axes, transform up
+            this->setOrientation(this->getOrientation() * this->getWorldOrientation().Inverse()
+                * rotation * this->getWorldOrientation());
+            break;
+        }
+    }
+
+    void WorldEntity::lookAt(const Vector3& target, TransformSpace::Space relativeTo, const Vector3& localDirectionVector)
+    {
+        Vector3 origin;
+        switch (relativeTo)
+        {
+        case TransformSpace::Local:
+            origin = Vector3::ZERO;
+            break;
+        case TransformSpace::Parent:
+            origin = this->getPosition();
+            break;
+        case TransformSpace::World:
+            origin = this->getWorldPosition();
+            break;
+        }
+        this->setDirection(target - origin, relativeTo, localDirectionVector);
+    }
+
+    void WorldEntity::setDirection(const Vector3& direction, TransformSpace::Space relativeTo, const Vector3& localDirectionVector)
+    {
+        Quaternion savedOrientation(this->getOrientation());
+        Ogre::Node::TransformSpace ogreRelativeTo;
+        switch (relativeTo)
+        {
+        case TransformSpace::Local:
+            ogreRelativeTo = Ogre::Node::TS_LOCAL; break;
+        case TransformSpace::Parent:
+            ogreRelativeTo = Ogre::Node::TS_PARENT; break;
+        case TransformSpace::World:
+            ogreRelativeTo = Ogre::Node::TS_WORLD; break;
+        }
+        this->node_->setDirection(direction, ogreRelativeTo, localDirectionVector);
+        Quaternion newOrientation(this->node_->getOrientation());
+        this->node_->setOrientation(savedOrientation);
+        this->setOrientation(newOrientation);
+    }
+
+    void WorldEntity::setScale3D(const Vector3& scale)
+    {
+        if (this->hasPhysics())
+        {
+            CCOUT(2) << "Warning: Cannot set the scale of a physical object: Not yet implemented." << std::endl;
+            return;
+        }
+
+        this->node_->setScale(scale);
+    }
+
+    void WorldEntity::setCollisionType(CollisionType type)
+    {
+        // If we are already attached to a parent, this would be a bad idea..
+        if (this->parent_)
+        {
+            CCOUT(2) << "Warning: Cannot set the collision type of a WorldEntity with a parent." << std::endl;
+            return;
+        }
+        else if (this->addedToPhysicalWorld())
+        {
+            CCOUT(2) << "Warning: Cannot set the collision type at run time." << std::endl;
+            return;
+        }
+
+        // Check for type legality. Could be StaticEntity or MobileEntity
+        if (!this->isCollisionTypeLegal(type))
+            return;
+        if (type != None && !this->getScene()->hasPhysics())
+        {
+            CCOUT(2) << "Warning: Cannot have physical bodies in a non physical scene." << std::endl;
+            return;
+        }
+
+        // Check whether we have to create or destroy.
+        if (type != None && this->collisionType_ == None)
+        {
+            // Check whether there was some scaling applied.
+            if (!this->node_->getScale().positionEquals(Vector3(1, 1, 1), 0.001))
+            {
+                CCOUT(2) << "Warning: Cannot create a physical body if there is scaling applied to the node: Not yet implemented." << std::endl;
+                return;
+            }
+
+            // Create new rigid body
+            btRigidBody::btRigidBodyConstructionInfo bodyConstructionInfo(0, this, this->collisionShape_->getCollisionShape());
+            this->physicalBody_ = new btRigidBody(bodyConstructionInfo);
+            this->physicalBody_->setUserPointer(this);
+            this->physicalBody_->setActivationState(DISABLE_DEACTIVATION);
+        }
+        else if (type == None && this->collisionType_ != None)
+        {
+            // Destroy rigid body
+            assert(this->physicalBody_);
+            deactivatePhysics();
+            delete this->physicalBody_;
+            this->physicalBody_ = 0;
+            this->collisionType_ = None;
+            this->collisionTypeSynchronised_ = None;
+            return;
+        }
+
+        // Change type
+        switch (type)
+        {
+        case Dynamic:
+            this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !(btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT));
+            break;
+        case Kinematic:
+            this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_STATIC_OBJECT | btCollisionObject::CF_KINEMATIC_OBJECT);
+            break;
+        case Static:
+            this->physicalBody_->setCollisionFlags(this->physicalBody_->getCollisionFlags() & !btCollisionObject::CF_KINEMATIC_OBJECT | btCollisionObject::CF_STATIC_OBJECT);
+            break;
+        case None:
+            return; // this->collisionType_ was None too
+        }
+
+        // Only sets this->collisionShape_
+        // However the assertion is to ensure that the internal bullet setting is right
+        updateCollisionType();
+        assert(this->collisionType_ == type);
+
+        // update mass and inertia tensor
+        recalculateMassProps();
+        resetPhysicsProps();
+        activatePhysics();
+    }
+
+    void WorldEntity::setCollisionTypeStr(const std::string& typeStr)
+    {
+        std::string typeStrLower = getLowercase(typeStr);
+        CollisionType type;
+        if (typeStrLower == "dynamic")
+            type = Dynamic;
+        else if (typeStrLower == "static")
+            type = Static;
+        else if (typeStrLower == "kinematic")
+            type = Kinematic;
+        else if (typeStrLower == "none")
+            type = None;
+        else
+            ThrowException(ParseError, std::string("Attempting to set an unknown collision type: '") + typeStr + "'.");
+        this->setCollisionType(type);
+    }
+
+    std::string WorldEntity::getCollisionTypeStr() const
+    {
+        switch (this->getCollisionType())
+        {
+            case Dynamic:
+                return "dynamic";
+            case Kinematic:
+                return "kinematic";
+            case Static:
+                return "static";
+            case None:
+                return "none";
+            default:
+                assert(false);
+                return "";
+        }
+    }
+
+    void WorldEntity::updateCollisionType()
+    {
+        if (!this->physicalBody_)
+            this->collisionType_ = None;
+        else if (this->physicalBody_->isKinematicObject())
+            this->collisionType_ = Kinematic;
+        else if (this->physicalBody_->isStaticObject())
+            this->collisionType_ = Static;
+        else
+            this->collisionType_ = Dynamic;
+        this->collisionTypeSynchronised_ = this->collisionType_;
+    }
+
+    void WorldEntity::notifyChildMassChanged() // Called by a child WE
+    {
+        // Note: CollisionShape changes of a child get handled over the internal CompoundCollisionShape already
+        // Recalculate mass
+        this->childrenMass_ = 0.0f;
+        for (std::set<WorldEntity*>::const_iterator it = this->children_.begin(); it != this->children_.end(); ++it)
+            this->childrenMass_ += (*it)->getMass();
+        recalculateMassProps();
+        // Notify parent WE
+        if (this->parent_)
+            parent_->notifyChildMassChanged();
+    }
+
+    void WorldEntity::notifyCollisionShapeChanged() // called by this->collisionShape_
+    {
+        if (hasPhysics())
+        {
+            // Bullet doesn't like sudden changes of the collision shape, so we remove and add it again
+            if (this->addedToPhysicalWorld())
+            {
+                this->deactivatePhysics();
+                this->physicalBody_->setCollisionShape(this->collisionShape_->getCollisionShape());
+                this->activatePhysics();
+            }
+            else
+                this->physicalBody_->setCollisionShape(this->collisionShape_->getCollisionShape());
+        }
+        recalculateMassProps();
+    }
+
+    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())
+        {
+            if (this->isStatic())
+            {
+                // Just set everything to zero
+                this->physicalBody_->setMassProps(0.0f, btVector3(0, 0, 0));
+            }
+            else if ((this->mass_ + this->childrenMass_) == 0.0f)
+            {
+                // 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;
+                btVector3 inertia(0, 0, 0);
+                this->collisionShape_->calculateLocalInertia(1.0f, inertia);
+                this->physicalBody_->setMassProps(1.0f, inertia);
+            }
+            else
+            {
+                this->physicalBody_->setMassProps(totalMass, this->localInertia_);
+            }
+        }
+    }
+
+    void WorldEntity::resetPhysicsProps()
+    {
+        if (this->hasPhysics())
+        {
+            this->physicalBody_->setRestitution(this->restitution_);
+            this->physicalBody_->setAngularFactor(this->angularFactor_);
+            this->physicalBody_->setDamping(this->linearDamping_, this->angularDamping_);
+            this->physicalBody_->setFriction(this->friction_);
+        }
+    }
 }
Index: code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/WorldEntity.h	(revision 2459)
@@ -22,4 +22,5 @@
  *   Author:
  *      Fabian 'x3n' Landau
+ *      Reto Grieder (physics)
  *   Co-authors:
  *      ...
@@ -32,7 +33,10 @@
 #include "OrxonoxPrereqs.h"
 
-#define OGRE_FORCE_ANGLE_TYPES
-
+#ifdef _NDEBUG
 #include <OgreSceneNode.h>
+#else
+#include <OgrePrerequisites.h>
+#endif
+#include "LinearMath/btMotionState.h"
 
 #include "network/synchronisable/Synchronisable.h"
@@ -42,5 +46,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport WorldEntity : public BaseObject, public Synchronisable
+    class _OrxonoxExport WorldEntity : public BaseObject, public Synchronisable, public btMotionState
     {
         public:
@@ -51,5 +55,5 @@
             void registerVariables();
 
-            inline Ogre::SceneNode* getNode() const
+            inline const Ogre::SceneNode* getNode() const
                 { return this->node_; }
 
@@ -64,11 +68,9 @@
             inline void setPosition(float x, float y, float z)
                 { this->setPosition(Vector3(x, y, z)); }
-            inline const Vector3& getPosition() const
-                { return this->node_->getPosition(); }
-            inline const Vector3& getWorldPosition() const
-                { return this->node_->getWorldPosition(); }
-
-            virtual void translate(const Vector3& distance, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
-            inline void translate(float x, float y, float z, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
+            const Vector3& getPosition() const;
+            const Vector3& getWorldPosition() const;
+
+            void translate(const Vector3& distance, TransformSpace::Space relativeTo = TransformSpace::Parent);
+            inline void translate(float x, float y, float z, TransformSpace::Space relativeTo = TransformSpace::Parent)
                 { this->translate(Vector3(x, y, z), relativeTo); }
 
@@ -80,48 +82,39 @@
             inline void setOrientation(const Vector3& axis, const Degree& angle)
                 { this->setOrientation(Quaternion(angle, axis)); }
-            inline const Quaternion& getOrientation() const
-                { return this->node_->getOrientation(); }
-            inline const Quaternion& getWorldOrientation() const
-                { return this->node_->getWorldOrientation(); }
-
-            virtual void rotate(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
-            inline void rotate(const Vector3& axis, const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
+            const Quaternion& getOrientation() const;
+            const Quaternion& getWorldOrientation() const;
+
+            void rotate(const Quaternion& rotation, TransformSpace::Space relativeTo = TransformSpace::Local);
+            inline void rotate(const Vector3& axis, const Degree& angle, TransformSpace::Space relativeTo = TransformSpace::Local)
                 { this->rotate(Quaternion(angle, axis), relativeTo); }
-            inline void rotate(const Vector3& axis, const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->rotate(Quaternion(angle, axis), relativeTo); }
-
-            virtual void yaw(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
-            inline void yaw(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->yaw(Degree(angle), relativeTo); }
-            virtual void pitch(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
-            inline void pitch(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->pitch(Degree(angle), relativeTo); }
-            virtual void roll(const Degree& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL) = 0;
-            inline void roll(const Radian& angle, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL)
-                { this->roll(Degree(angle), relativeTo); }
-
-            virtual void lookAt(const Vector3& target, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z) = 0;
-            virtual void setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z) = 0;
-            inline void setDirection(float x, float y, float z, Ogre::Node::TransformSpace relativeTo = Ogre::Node::TS_LOCAL, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
+
+            inline void yaw(const Degree& angle, TransformSpace::Space relativeTo = TransformSpace::Local)
+                { this->rotate(Quaternion(angle, Vector3::UNIT_Y), relativeTo); }
+            inline void pitch(const Degree& angle, TransformSpace::Space relativeTo = TransformSpace::Local)
+                { this->rotate(Quaternion(angle, Vector3::UNIT_X), relativeTo); }
+            inline void roll(const Degree& angle, TransformSpace::Space relativeTo = TransformSpace::Local)
+                { this->rotate(Quaternion(angle, Vector3::UNIT_Z), relativeTo); }
+
+            void lookAt(const Vector3& target, TransformSpace::Space relativeTo = TransformSpace::Parent, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
+            void setDirection(const Vector3& direction, TransformSpace::Space relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z);
+            inline void setDirection(float x, float y, float z, TransformSpace::Space relativeTo = TransformSpace::Local, const Vector3& localDirectionVector = Vector3::NEGATIVE_UNIT_Z)
                 { this->setDirection(Vector3(x, y, z), relativeTo, localDirectionVector); }
 
-            inline void setScale3D(const Vector3& scale)
-                { this->node_->setScale(scale); }
+            virtual void setScale3D(const Vector3& scale);
             inline void setScale3D(float x, float y, float z)
-                { this->node_->setScale(x, y, z); }
-            inline const Vector3& getScale3D(void) const
-                { return this->node_->getScale(); }
-
-            inline void setScale(float scale)
-                { this->node_->setScale(scale, scale, scale); }
+                { this->setScale3D(Vector3(x, y, z)); }
+            const Vector3& getScale3D(void) const;
+
+            void setScale(float scale)
+                { this->setScale3D(scale, scale, scale); }
             inline float getScale() const
                 { Vector3 scale = this->getScale3D(); return (scale.x == scale.y && scale.x == scale.z) ? scale.x : 1; }
 
             inline void scale3D(const Vector3& scale)
-                { this->node_->scale(scale); }
+                { this->setScale3D(this->getScale3D() * scale); }
             inline void scale3D(float x, float y, float z)
-                { this->node_->scale(x, y, z); }
+                { this->scale3D(Vector3(x, y, z)); }
             inline void scale(float scale)
-                { this->node_->scale(scale, scale, scale); }
+                { this->scale3D(scale, scale, scale); }
 
             void attach(WorldEntity* object);
@@ -130,4 +123,8 @@
             inline const std::set<WorldEntity*>& getAttachedObjects() const
                 { return this->children_; }
+
+            void attachOgreObject(Ogre::MovableObject* object);
+            void detachOgreObject(Ogre::MovableObject* object);
+            Ogre::MovableObject* detachOgreObject(const Ogre::String& name);
 
             inline void attachToParent(WorldEntity* parent)
@@ -138,10 +135,10 @@
                 { return this->parent_; }
 
+            void notifyChildPropsChanged();
+
         protected:
             Ogre::SceneNode* node_;
 
         private:
-            void updateParent();
-
             inline void lookAt_xmlport(const Vector3& target)
                 { this->lookAt(target); }
@@ -155,8 +152,142 @@
                 { this->roll(angle); }
 
+            // network callbacks
+            void parentChanged();
+            inline void scaleChanged()
+                { this->setScale3D(this->getScale3D()); }
+
             WorldEntity* parent_;
             unsigned int parentID_;
             std::set<WorldEntity*> children_;
+
+
+        /////////////
+        // Physics //
+        /////////////
+
+        public:
+            enum CollisionType
+            {
+                Dynamic,
+                Kinematic,
+                Static,
+                None
+            };
+
+            bool hasPhysics()       const { return getCollisionType() != None     ; }
+            bool isStatic()         const { return getCollisionType() == Static   ; }
+            bool isKinematic()      const { return getCollisionType() == Kinematic; }
+            bool isDynamic()        const { return getCollisionType() == Dynamic  ; }
+            bool isPhysicsActive()  const { return this->bPhysicsActive_; }
+            bool addedToPhysicalWorld() const;
+
+            void activatePhysics();
+            void deactivatePhysics();
+
+            inline CollisionType getCollisionType() const
+                { return this->collisionType_; }
+            void setCollisionType(CollisionType type);
+
+            void setCollisionTypeStr(const std::string& type);
+            std::string getCollisionTypeStr() const;
+
+            inline void setMass(float mass)
+                { this->mass_ = mass; recalculateMassProps(); }
+            inline float getMass() const
+                { return this->mass_; }
+
+            inline float getTotalMass() const
+                { return this->mass_ + this->childrenMass_; }
+
+            inline const btVector3& getLocalInertia() const
+                { return this->localInertia_; }
+
+            inline void setRestitution(float restitution)
+                { this->restitution_ = restitution; resetPhysicsProps(); }
+            inline float getRestitution() const
+                { return this->restitution_; }
+
+            inline void setAngularFactor(float angularFactor)
+                { this->angularFactor_ = angularFactor; resetPhysicsProps(); }
+            inline float getAngularFactor() const
+                { return this->angularFactor_; }
+
+            inline void setLinearDamping(float linearDamping)
+                { this->linearDamping_ = linearDamping; resetPhysicsProps(); }
+            inline float getLinearDamping() const
+                { return this->linearDamping_; }
+
+            inline void setAngularDamping(float angularDamping)
+                { this->angularDamping_ = angularDamping; resetPhysicsProps(); }
+            inline float getAngularDamping() const
+                { return this->angularDamping_; }
+
+            inline void setFriction(float friction)
+                { this->friction_ = friction; resetPhysicsProps(); }
+            inline float getFriction() const
+                { return this->friction_; }
+
+            void attachCollisionShape(CollisionShape* shape);
+            void detachCollisionShape(CollisionShape* shape);
+            CollisionShape* getAttachedCollisionShape(unsigned int index) const;
+
+            inline CompoundCollisionShape* getCollisionShape()
+                { return this->collisionShape_; }
+            inline btRigidBody* getPhysicalBody()
+                { return this->physicalBody_; }
+
+            void notifyCollisionShapeChanged();
+            void notifyChildMassChanged();
+
+        protected:
+            virtual bool isCollisionTypeLegal(CollisionType type) const = 0;
+
+            btRigidBody*  physicalBody_;
+
+        private:
+            void updateCollisionType();
+            void recalculateMassProps();
+            void resetPhysicsProps();
+
+            // network callbacks
+            void collisionTypeChanged();
+            void physicsActivityChanged();
+            inline void massChanged()
+                { this->setMass(this->mass_); }
+            inline void restitutionChanged()
+                { this->setRestitution(this->restitution_); }
+            inline void angularFactorChanged()
+                { this->setAngularFactor(this->angularFactor_); }
+            inline void linearDampingChanged()
+                { this->setLinearDamping(this->linearDamping_); }
+            inline void angularDampingChanged()
+                { this->setAngularDamping(this->angularDamping_); }
+            inline void frictionChanged()
+                { this->setFriction(this->friction_); }
+
+            CollisionType                collisionType_;
+            CollisionType                collisionTypeSynchronised_;
+            bool                         bPhysicsActive_;
+            bool                         bPhysicsActiveSynchronised_;
+            CompoundCollisionShape*      collisionShape_;
+            btScalar                     mass_;
+            btVector3                    localInertia_;
+            btScalar                     restitution_;
+            btScalar                     angularFactor_;
+            btScalar                     linearDamping_;
+            btScalar                     angularDamping_;
+            btScalar                     friction_;
+            btScalar                     childrenMass_;
     };
+
+    // Inline heavily used functions for release builds. In debug, we better avoid including OgreSceneNode here.
+#ifdef _NDEBUG
+    inline const Vector3& WorldEntity::getPosition() const
+        { return this->node_->getPosition(); }
+    inline const Quaternion& WorldEntity::getOrientation() const
+        { return this->node_->getrOrientation(); }
+    inline const Vector3& WorldEntity::getScale3D(void) const
+        { return this->node_->getScale(); }
+#endif
 }
 
Index: code/branches/presentation/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2459)
@@ -30,11 +30,15 @@
 #include "SpaceShip.h"
 
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+#include "util/Math.h"
+#include "util/Exception.h"
 #include "core/CoreIncludes.h"
 #include "core/ConfigValueIncludes.h"
 #include "core/XMLPort.h"
-#include "util/Math.h"
 
 namespace orxonox
 {
+    const float orientationGain = 100;
     CreateFactory(SpaceShip);
 
@@ -43,20 +47,18 @@
         RegisterObject(SpaceShip);
 
-        this->zeroDegree_ = 0;
+        this->primaryThrust_  = 100;
+        this->auxilaryThrust_ =  30;
+        this->rotationThrust_ =  10;
 
-        this->maxSpeed_ = 0;
-        this->maxSecondarySpeed_ = 0;
-        this->maxRotation_ = 0;
-        this->translationAcceleration_ = 0;
-        this->rotationAcceleration_ = 0;
-        this->translationDamping_ = 0;
-
-        this->yawRotation_ = 0;
-        this->pitchRotation_ = 0;
-        this->rollRotation_ = 0;
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
 
         this->bInvertYAxis_ = false;
 
         this->setDestroyWhenPlayerLeft(true);
+
+        // SpaceShip is always a physical object per default
+        // Be aware of this call: The collision type legality check will not reach derived classes!
+        this->setCollisionType(WorldEntity::Dynamic);
 
         this->setConfigValues();
@@ -72,20 +74,14 @@
         SUPER(SpaceShip, XMLPort, xmlelement, mode);
 
-        XMLPortParam(SpaceShip, "maxspeed",          setMaxSpeed,          getMaxSpeed,          xmlelement, mode);
-        XMLPortParam(SpaceShip, "maxsecondaryspeed", setMaxSecondarySpeed, getMaxSecondarySpeed, xmlelement, mode);
-        XMLPortParam(SpaceShip, "maxrotation",       setMaxRotation,       getMaxRotation,       xmlelement, mode);
-        XMLPortParam(SpaceShip, "transacc",          setTransAcc,          getTransAcc,          xmlelement, mode);
-        XMLPortParam(SpaceShip, "rotacc",            setRotAcc,            getRotAcc,            xmlelement, mode);
-        XMLPortParam(SpaceShip, "transdamp",         setTransDamp,         getTransDamp,         xmlelement, mode);
+        XMLPortParamVariable(SpaceShip, "primaryThrust",  primaryThrust_,  xmlelement, mode);
+        XMLPortParamVariable(SpaceShip, "auxilaryThrust", auxilaryThrust_, xmlelement, mode);
+        XMLPortParamVariable(SpaceShip, "rotationThrust", rotationThrust_, xmlelement, mode);
     }
 
     void SpaceShip::registerVariables()
     {
-        registerVariable(this->maxSpeed_,                variableDirection::toclient);
-        registerVariable(this->maxSecondarySpeed_,       variableDirection::toclient);
-        registerVariable(this->maxRotation_,             variableDirection::toclient);
-        registerVariable(this->translationAcceleration_, variableDirection::toclient);
-        registerVariable(this->rotationAcceleration_,    variableDirection::toclient);
-        registerVariable(this->translationDamping_,      variableDirection::toclient);
+        registerVariable(this->primaryThrust_,  variableDirection::toclient);
+        registerVariable(this->auxilaryThrust_, variableDirection::toclient);
+        registerVariable(this->rotationThrust_, variableDirection::toclient);
     }
 
@@ -95,69 +91,34 @@
     }
 
+    bool SpaceShip::isCollisionTypeLegal(WorldEntity::CollisionType type) const
+    {
+        if (type != WorldEntity::Dynamic)
+        {
+            CCOUT(1) << "Error: Cannot tell a SpaceShip not to be dynamic! Ignoring." << std::endl;
+            assert(false); // Only in debug mode
+            return false;
+        }
+        else
+            return true;
+    }
+
     void SpaceShip::tick(float dt)
     {
-        if (this->isLocallyControlled())
-        {
-            // #####################################
-            // ############# STEERING ##############
-            // #####################################
-
-            Vector3 velocity = this->getVelocity();
-            if (velocity.x > this->maxSecondarySpeed_)
-                velocity.x = this->maxSecondarySpeed_;
-            if (velocity.x < -this->maxSecondarySpeed_)
-                velocity.x = -this->maxSecondarySpeed_;
-            if (velocity.y > this->maxSecondarySpeed_)
-                velocity.y = this->maxSecondarySpeed_;
-            if (velocity.y < -this->maxSecondarySpeed_)
-                velocity.y = -this->maxSecondarySpeed_;
-            if (velocity.z > this->maxSecondarySpeed_)
-                velocity.z = this->maxSecondarySpeed_;
-            if (velocity.z < -this->maxSpeed_)
-                velocity.z = -this->maxSpeed_;
-
-            // normalize velocity and acceleration
-            for (size_t dimension = 0; dimension < 3; ++dimension)
-            {
-                if (this->acceleration_[dimension] == 0)
-                {
-                    if (velocity[dimension] > 0)
-                    {
-                        velocity[dimension] -= (this->translationDamping_ * dt);
-                        if (velocity[dimension] < 0)
-                            velocity[dimension] = 0;
-                    }
-                    else if (velocity[dimension] < 0)
-                    {
-                        velocity[dimension] += (this->translationDamping_ * dt);
-                        if (velocity[dimension] > 0)
-                            velocity[dimension] = 0;
-                    }
-                }
-            }
-
-            this->setVelocity(velocity);
-        }
-
-
         SUPER(SpaceShip, tick, dt);
-
 
         if (this->isLocallyControlled())
         {
-            this->yaw(this->yawRotation_ * dt);
-            if (this->bInvertYAxis_)
-                this->pitch(Degree(-this->pitchRotation_ * dt));
+            this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() * getMass() * this->auxilaryThrust_);
+            this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() * getMass() * this->auxilaryThrust_);
+            if (this->localLinearAcceleration_.z() > 0)
+                this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->auxilaryThrust_);
             else
-                this->pitch(Degree( this->pitchRotation_ * dt));
-            this->roll(this->rollRotation_ * dt);
+                this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
+            this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
+            this->localLinearAcceleration_.setValue(0, 0, 0);
 
-            this->acceleration_.x = 0;
-            this->acceleration_.y = 0;
-            this->acceleration_.z = 0;
-
-            this->yawRotation_   = this->zeroDegree_;
-            this->pitchRotation_ = this->zeroDegree_;
-            this->rollRotation_  = this->zeroDegree_;
+            this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
+            this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
+            this->localAngularAcceleration_.setValue(0, 0, 0);
         }
     }
@@ -165,45 +126,30 @@
     void SpaceShip::moveFrontBack(const Vector2& value)
     {
-        this->acceleration_.z = -this->translationAcceleration_ * value.x;
+        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
     }
 
     void SpaceShip::moveRightLeft(const Vector2& value)
     {
-        this->acceleration_.x = this->translationAcceleration_ * value.x;
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
     }
 
     void SpaceShip::moveUpDown(const Vector2& value)
     {
-        this->acceleration_.y = this->translationAcceleration_ * value.x;
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
     }
 
     void SpaceShip::rotateYaw(const Vector2& value)
     {
-        Degree temp = value.x * value.x * sgn(value.x) * this->rotationAcceleration_;
-        if (temp > this->maxRotation_)
-            temp = this->maxRotation_;
-        if (temp < -this->maxRotation_)
-            temp = -this->maxRotation_;
-        this->yawRotation_ = Degree(temp);
+        this->localAngularAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
     }
 
     void SpaceShip::rotatePitch(const Vector2& value)
     {
-        Degree temp = value.x * value.x * sgn(value.x) * this->rotationAcceleration_;
-        if (temp > this->maxRotation_)
-            temp = this->maxRotation_;
-        if (temp < -this->maxRotation_)
-            temp = -this->maxRotation_;
-        this->pitchRotation_ = Degree(temp);
+        this->localAngularAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
     }
 
     void SpaceShip::rotateRoll(const Vector2& value)
     {
-        Degree temp = value.x * value.x * sgn(value.x) * this->rotationAcceleration_;
-        if (temp > this->maxRotation_)
-            temp = this->maxRotation_;
-        if (temp < -this->maxRotation_)
-            temp = -this->maxRotation_;
-        this->rollRotation_ = Degree(temp);
+        this->localAngularAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
     }
 
Index: code/branches/presentation/src/orxonox/objects/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/pawns/SpaceShip.h	(revision 2459)
@@ -32,4 +32,6 @@
 #include "OrxonoxPrereqs.h"
 
+#include "LinearMath/btVector3.h"
+
 #include "Pawn.h"
 
@@ -57,45 +59,16 @@
             virtual void fire();
 
-            void setMaxSpeed(float value)
-                { this->maxSpeed_ = value; }
-            void setMaxSecondarySpeed(float value)
-                { this->maxSecondarySpeed_ = value; }
-            void setMaxRotation(const Degree& value)
-                { this->maxRotation_ = value; }
-            void setTransAcc(float value)
-                { this->translationAcceleration_ = value; }
-            void setRotAcc(const Degree& value)
-                { this->rotationAcceleration_ = value; }
-            void setTransDamp(float value)
-                { this->translationDamping_ = value; }
-
-            inline float getMaxSpeed() const
-                { return this->maxSpeed_; }
-            inline float getMaxSecondarySpeed() const
-                { return this->maxSecondarySpeed_; }
-            inline float getMaxRotation() const
-                { return this->maxRotation_.valueDegrees(); }
-            inline float getTransAcc() const
-                { return this->translationAcceleration_; }
-            inline float getRotAcc() const
-                { return this->rotationAcceleration_.valueDegrees(); }
-            inline float getTransDamp() const
-                { return this->translationDamping_; }
-
         protected:
             bool bInvertYAxis_;
 
-            float maxSpeed_;
-            float maxSecondarySpeed_;
-            float translationAcceleration_;
-            float translationDamping_;
+            float primaryThrust_;
+            float auxilaryThrust_;
+            float rotationThrust_;
 
-            Degree maxRotation_;
-            Degree rotationAcceleration_;
+            btVector3 localLinearAcceleration_;
+            btVector3 localAngularAcceleration_;
 
-            Degree zeroDegree_;
-            Degree pitchRotation_;
-            Degree yawRotation_;
-            Degree rollRotation_;
+        private:
+            virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const;
     };
 }
Index: code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.cc	(revision 2459)
@@ -29,4 +29,6 @@
 #include "OrxonoxStableHeaders.h"
 #include "Spectator.h"
+
+#include <OgreBillboardSet.h>
 
 #include "core/CoreIncludes.h"
@@ -50,9 +52,10 @@
 
         this->speed_ = 100;
-        this->rotationSpeed_ = 3;
+        this->rotationGain_ = 3;
 
         this->yaw_ = 0;
         this->pitch_ = 0;
         this->roll_ = 0;
+        this->localVelocity_ = Vector3::ZERO;
         this->setHudTemplate("spectatorhud");
         this->hudmode_ = 0;
@@ -63,5 +66,5 @@
         this->greetingFlare_->setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.8), Vector3(0, 20, 0), 1);
         if (this->greetingFlare_->getBillboardSet())
-            this->getNode()->attachObject(this->greetingFlare_->getBillboardSet());
+            this->attachOgreObject(this->greetingFlare_->getBillboardSet());
         this->greetingFlare_->setVisible(false);
         this->bGreetingFlareVisible_ = false;
@@ -78,5 +81,5 @@
             {
                 if (this->greetingFlare_->getBillboardSet())
-                    this->getNode()->detachObject(this->greetingFlare_->getBillboardSet());
+                    this->detachOgreObject(this->greetingFlare_->getBillboardSet());
                 delete this->greetingFlare_;
             }
@@ -108,11 +111,22 @@
         if (this->isLocallyControlled())
         {
-            Vector3 velocity = this->getVelocity();
-            velocity.normalise();
-            this->setVelocity(velocity * this->speed_);
-
-            this->yaw(Radian(this->yaw_ * this->rotationSpeed_));
-            this->pitch(Radian(this->pitch_ * this->rotationSpeed_));
-            this->roll(Radian(this->roll_ * this->rotationSpeed_));
+            float localSpeedSquared = this->localVelocity_.squaredLength();
+            float localSpeed;
+            if (localSpeedSquared > 1.0)
+                localSpeed = this->speed_ / sqrtf(localSpeedSquared);
+            else
+                localSpeed = this->speed_;
+
+            this->localVelocity_.x *= localSpeed;
+            this->localVelocity_.y *= localSpeed;
+            this->localVelocity_.z *= localSpeed;
+            this->setVelocity(this->getOrientation() * this->localVelocity_);
+            this->localVelocity_.x = 0;
+            this->localVelocity_.y = 0;
+            this->localVelocity_.z = 0;
+
+            this->yaw  (Radian(this->yaw_   * this->rotationGain_));
+            this->pitch(Radian(this->pitch_ * this->rotationGain_));
+            this->roll (Radian(this->roll_  * this->rotationGain_));
 
             this->yaw_ = this->pitch_ = this->roll_ = 0;
@@ -120,9 +134,4 @@
 
         SUPER(Spectator, tick, dt);
-
-        if (this->isLocallyControlled())
-        {
-            this->setVelocity(Vector3::ZERO);
-        }
     }
 
@@ -143,30 +152,30 @@
     void Spectator::moveFrontBack(const Vector2& value)
     {
-        this->setVelocity(this->getVelocity() + value.y * this->speed_ * WorldEntity::FRONT);
+        this->localVelocity_.z -= value.x;
     }
 
     void Spectator::moveRightLeft(const Vector2& value)
     {
-        this->setVelocity(this->getVelocity() + value.y * this->speed_ * WorldEntity::RIGHT);
+        this->localVelocity_.x += value.x;
     }
 
     void Spectator::moveUpDown(const Vector2& value)
     {
-        this->setVelocity(this->getVelocity() + value.y * this->speed_ * WorldEntity::UP);
+        this->localVelocity_.y += value.x;
     }
 
     void Spectator::rotateYaw(const Vector2& value)
     {
-        this->yaw_ = value.y;
+        this->yaw_ += value.y;
     }
 
     void Spectator::rotatePitch(const Vector2& value)
     {
-        this->pitch_ = value.y;
+        this->pitch_ += value.y;
     }
 
     void Spectator::rotateRoll(const Vector2& value)
     {
-        this->roll_ = value.y;
+        this->roll_ += value.y;
     }
 
Index: code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/pawns/Spectator.h	(revision 2459)
@@ -69,9 +69,11 @@
 
             float speed_;
-            float rotationSpeed_;
+            float rotationGain_;
 
             float yaw_;
             float pitch_;
             float roll_;
+
+            Vector3 localVelocity_;
 
             int hudmode_;
Index: code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.cc
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.cc	(revision 2459)
@@ -31,4 +31,5 @@
 
 #include <OgreBillboard.h>
+#include <OgreBillboardSet.h>
 #include "util/Debug.h"
 #include "core/CoreIncludes.h"
@@ -44,5 +45,5 @@
   CreateFactory(Trigger);
 
-  Trigger::Trigger(BaseObject* creator) : PositionableEntity(creator)
+  Trigger::Trigger(BaseObject* creator) : StaticEntity(creator)
   {
     RegisterObject(Trigger);
@@ -71,5 +72,5 @@
 
       if (this->debugBillboard_.getBillboardSet())
-        this->getNode()->attachObject(this->debugBillboard_.getBillboardSet());
+          this->attachOgreObject(this->debugBillboard_.getBillboardSet());
     }
 
Index: code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.h
===================================================================
--- code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 2436)
+++ code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.h	(revision 2459)
@@ -36,5 +36,5 @@
 
 #include "objects/Tickable.h"
-#include "objects/worldentities/PositionableEntity.h"
+#include "objects/worldentities/StaticEntity.h"
 #include "tools/BillboardSet.h"
 
@@ -48,5 +48,5 @@
   };
 
-  class _OrxonoxExport Trigger : public PositionableEntity, public Tickable
+  class _OrxonoxExport Trigger : public StaticEntity, public Tickable
   {
     public:
