Index: code/trunk/src/orxonox/worldentities/WorldEntity.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 10281)
+++ code/trunk/src/orxonox/worldentities/WorldEntity.cc	(revision 10288)
@@ -98,12 +98,14 @@
         this->collisionType_             = None;
         this->collisionTypeSynchronised_ = None;
-        this->mass_           = 1.0f;
-        this->childrenMass_   = 0;
+        this->mass_                 = 1.0f;
+        this->childrenMass_         = 0;
         // Using bullet default values
-        this->restitution_    = 0;
-        this->angularFactor_  = 1;
-        this->linearDamping_  = 0;
-        this->angularDamping_ = 0;
-        this->friction_       = 0.5;
+        this->restitution_          = 0;
+        this->angularFactor_        = 1;
+        this->linearDamping_        = 0;
+        this->angularDamping_       = 0;
+        this->friction_             = 0.5;
+        this->ccdMotionThreshold_   = 0.0;
+        this->ccdSweptSphereRadius_ = 0.0;
         this->bCollisionCallbackActive_ = false;
         this->bCollisionResponseActive_ = true;
@@ -198,4 +200,8 @@
         registerVariable(this->angularDamping_, VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::angularDampingChanged));
         registerVariable(this->friction_,       VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::frictionChanged));
+        registerVariable(this->ccdMotionThreshold_,
+                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::ccdMotionThresholdChanged));
+        registerVariable(this->ccdSweptSphereRadius_,
+                                                VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::ccdSweptSphereRadiusChanged));
         registerVariable(this->bCollisionCallbackActive_,
                                                 VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::collisionCallbackActivityChanged));
@@ -1003,4 +1009,6 @@
             this->physicalBody_->setDamping(this->linearDamping_, this->angularDamping_);
             this->physicalBody_->setFriction(this->friction_);
+            this->physicalBody_->setCcdMotionThreshold(this->ccdMotionThreshold_);
+            this->physicalBody_->setCcdSweptSphereRadius(this->ccdSweptSphereRadius_);
         }
     }
Index: code/trunk/src/orxonox/worldentities/WorldEntity.h
===================================================================
--- code/trunk/src/orxonox/worldentities/WorldEntity.h	(revision 10281)
+++ code/trunk/src/orxonox/worldentities/WorldEntity.h	(revision 10288)
@@ -355,4 +355,34 @@
                 { return this->friction_; }
 
+            /**
+             * Sets the motion threshold for continuous collision detection (CCD). This should be activated if an object moves further in one tick than its own
+             * size. This means that in one tick the object may be in front of a wall and in the next tick it will be behind the wall without ever triggering a
+             * collision. CCD ensures that collisions are still detected. By default it is deactivated (threshold = 0) which is fine for slow or static
+             * objects, but it should be set to a real value for fast moving objects (e.g. projectiles).
+             *
+             * A good value for the threshold is (diameter^2).
+             *
+             * @param ccdMotionThreshold CCD is enabled if the squared velocity of the object is > ccdMotionThreshold (default 0.0). 0.0 means deactivated.
+             */
+            inline void setCcdMotionThreshold(float ccdMotionThreshold)
+                { this->ccdMotionThreshold_ = ccdMotionThreshold; internalSetPhysicsProps(); }
+            //! Returns the currently used motion threshold for CCD (0 means CCD is deactivated).
+            inline float getCcdMotionThreshold() const
+                { return this->ccdMotionThreshold_; }
+
+            /**
+             * Sets the radius of the sphere which is used for continuous collision detection (CCD). The sphere should be embedded inside the objects collision
+             * shape, preferably smaller. @see setCcdMotionThreshold for more information about CCD.
+             *
+             * A good value for the radius is (diameter/5).
+             *
+             * @param ccdSweptSphereRadius The diameter of the sphere which is used for CCD (default 0.0).
+             */
+            inline void setCcdSweptSphereRadius(float ccdSweptSphereRadius)
+                { this->ccdSweptSphereRadius_ = ccdSweptSphereRadius; internalSetPhysicsProps(); }
+            //! Returns the currently used radius of the sphere for CCD.
+            inline float getCcdSweptSphereRadius() const
+                { return this->ccdSweptSphereRadius_; }
+
             void attachCollisionShape(CollisionShape* shape);
             void detachCollisionShape(CollisionShape* shape);
@@ -438,4 +468,10 @@
             inline void frictionChanged()
                 { this->setFriction(this->friction_); }
+            //! Network callback workaround to call a function when the value changes.
+            inline void ccdMotionThresholdChanged()
+                { this->setCcdMotionThreshold(this->ccdMotionThreshold_); }
+            //! Network callback workaround to call a function when the value changes.
+            inline void ccdSweptSphereRadiusChanged()
+                { this->setCcdSweptSphereRadius(this->ccdSweptSphereRadius_); }
 
             CollisionType                collisionType_;                 //!< @see setCollisionType
@@ -454,4 +490,6 @@
             btScalar                     friction_;                      //!< @see setFriction
             btScalar                     childrenMass_;                  //!< Sum of all the children's masses
+            btScalar                     ccdMotionThreshold_;            //!< @see setCcdMotionThreshold
+            btScalar                     ccdSweptSphereRadius_;          //!< @see setCcdSweptSphereRadius
             bool                         bCollisionCallbackActive_;      //!< @see enableCollisionCallback
             bool                         bCollisionResponseActive_;      //!< Tells whether the object should respond to collisions
