Index: code/branches/particles2/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/particles2/src/orxonox/worldentities/CMakeLists.txt	(revision 6050)
+++ code/branches/particles2/src/orxonox/worldentities/CMakeLists.txt	(revision 6059)
@@ -5,4 +5,5 @@
   MobileEntity.cc
   ControllableEntity.cc
+  Rocket.cc
 
   BigExplosion.cc
Index: code/branches/particles2/src/orxonox/worldentities/Rocket.cc
===================================================================
--- code/branches/particles2/src/orxonox/worldentities/Rocket.cc	(revision 6059)
+++ code/branches/particles2/src/orxonox/worldentities/Rocket.cc	(revision 6059)
@@ -0,0 +1,183 @@
+/*
+ *   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 "Rocket.h"
+
+#include "core/XMLPort.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+namespace orxonox
+{
+	CreateFactory(Rocket);    // put your code in here:
+    // create the factory for the Rocket
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes some default values.
+    */
+    Rocket::Rocket(BaseObject* creator) : ControllableEntity(creator)
+    {
+        this->myController_ = 0;
+        // put your code in here:
+        RegisterObject(Rocket);// - register the Rocket class to the core
+        
+        this->localLinearAcceleration_.setValue(0, 0, 0);
+        this->localAngularAcceleration_.setValue(0, 0, 0);
+        this->primaryThrust_  = 100;
+        this->auxilaryThrust_ = 100;
+        this->rotationThrust_ = 10;
+        
+        this->setCollisionType(WorldEntity::Kinematic);
+        
+        this->myController_ = new RocketController(static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator.
+    }
+
+    /**
+    @brief
+        Destructor. Destroys controller, if present.
+    */
+    Rocket::~Rocket()
+    {
+        if( this->myController_ != NULL )
+            this->myController_->destroy();
+    }
+
+    /**
+    @brief
+        Method for creating a Rocket through XML.
+    */
+    void Rocket::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        // this calls the XMLPort function of the parent class
+        SUPER(Rocket, XMLPort, xmlelement, mode);
+
+        // put your code in here:
+		XMLPortParam(Rocket, "primaryThrust", setPrimaryThrust, getPrimaryThrust, xmlelement, mode);
+		//XMLPortParam(Rocket, "auxilaryThrust", setAuxilaryThrust, getAuxilaryThrust, xmlelement, mode);
+		//XMLPortParam(Rocket, "rotationThrust", setRotationThrust, getRotationThrust, xmlelement, mode);
+        // make sure you add the variables primaryThrust_, auxilaryThrust_ and rotationThrust_ to xmlport 
+        // make sure that the set- and get-functions exist.
+        // variables can be added by the following command 
+        // XMLPortParam(Classname, "xml-attribute-name (i.e. variablename)", setFunction, getFunction, xmlelement, mode)
+ 
+    }
+
+    /**
+    @brief
+        Defines which actions the Rocket has to take in each tick.
+    @param dt
+        The length of the tick.
+    */
+    void Rocket::tick(float dt)
+    {
+        SUPER(Rocket, tick, dt);
+        
+        //if (this->hasLocalController())
+        //{
+            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->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() * getMass() * this->primaryThrust_);
+            this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * this->localLinearAcceleration_);
+            this->localLinearAcceleration_.setValue(0, 0, 0);
+        
+            this->localAngularAcceleration_ *= this->getLocalInertia() * this->rotationThrust_;
+            this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * this->localAngularAcceleration_);
+            this->localAngularAcceleration_.setValue(0, 0, 0);
+        //}
+    }
+    
+    /**
+    @brief
+        Moves the Rocket in the negative z-direction (Front/Back) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void Rocket::moveFrontBack(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setZ(this->localLinearAcceleration_.z() - value.x);
+    }
+
+    /**
+    @brief
+        Moves the Rocket in the x-direction (Right/Left) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void Rocket::moveRightLeft(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setX(this->localLinearAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Moves the Rocket in the y-direction (Up/Down) by an amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the movement.
+    */
+    void Rocket::moveUpDown(const Vector2& value)
+    {
+        this->localLinearAcceleration_.setY(this->localLinearAcceleration_.y() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the Rocket around the y-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void Rocket::rotateYaw(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x);
+    }
+
+    /**
+    @brief
+        Rotates the Rocket around the x-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void Rocket::rotatePitch(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
+    }
+
+    /**
+    @brief
+        Rotates the Rocket around the z-axis by the amount specified by the first component of the input 2-dim vector.
+    @param value
+        The vector determining the amount of the angular movement.
+    */
+    void Rocket::rotateRoll(const Vector2& value)
+    {
+        this->localAngularAcceleration_.setZ(this->localAngularAcceleration_.z() + value.x);
+    }
+    
+}
Index: code/branches/particles2/src/orxonox/worldentities/Rocket.h
===================================================================
--- code/branches/particles2/src/orxonox/worldentities/Rocket.h	(revision 6059)
+++ code/branches/particles2/src/orxonox/worldentities/Rocket.h	(revision 6059)
@@ -0,0 +1,131 @@
+/*
+ *   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 _Rocket_H__
+#define _Rocket_H__
+
+#include "OrxonoxPrereqs.h"
+#include "worldentities/ControllableEntity.h"
+#include "controllers/RocketController.h"
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Rocket, that is made to move upon a specified pattern.
+        This class was constructed for the PPS tutorial.
+    @author
+        Oli Scheuss
+    */
+    class _OrxonoxExport Rocket : public ControllableEntity
+    {
+        public:
+            Rocket(BaseObject* creator);
+            virtual ~Rocket();
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Rocket through XML.
+            virtual void tick(float dt); //!< Defines which actions the Rocket has to take in each tick.
+
+            
+            virtual void moveFrontBack(const Vector2& value);
+            virtual void moveRightLeft(const Vector2& value);
+            virtual void moveUpDown(const Vector2& value);
+
+            virtual void rotateYaw(const Vector2& value);
+            virtual void rotatePitch(const Vector2& value);
+            virtual void rotateRoll(const Vector2& value);
+            
+            /**
+            @brief Moves the Rocket in the Front/Back-direction by the specifed amount.
+            @param value  The amount by which the Rocket is to be moved.
+            */
+            inline void moveFrontBack(float value)
+            { this->moveFrontBack(Vector2(value, 0)); }
+            /**
+            @brief Moves the Rocket in the Right/Left-direction by the specifed amount.
+            @param value  The amount by which the Rocket is to be moved.
+            */
+            inline void moveRightLeft(float value)
+            { this->moveRightLeft(Vector2(value, 0)); }
+            /**
+            @brief Moves the Rocket in the Up/Down-direction by the specifed amount.
+            @param value  The amount by which the Rocket is to be moved.
+            */
+            inline void moveUpDown(float value)
+            { this->moveUpDown(Vector2(value, 0)); }
+            
+            /**
+            @brief Rotates the Rocket around the y-axis by the specifed amount.
+            @param value  The amount by which the Rocket is to be rotated.
+            */
+            inline void rotateYaw(float value)
+            { this->rotateYaw(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Rocket around the x-axis by the specifed amount.
+            @param value  The amount by which the Rocket is to be rotated.
+            */
+            inline void rotatePitch(float value)
+            { this->rotatePitch(Vector2(value, 0)); }
+            /**
+            @brief Rotates the Rocket around the z-axis by the specifed amount.
+            @param value  The amount by which the Rocket is to be rotated.
+            */
+            inline void rotateRoll(float value)
+            { this->rotateRoll(Vector2(value, 0)); }
+            
+            /**
+            @brief Sets the primary thrust to the input amount.
+            @param thrust The amount of thrust.
+            */
+            inline void setPrimaryThrust( float thrust )
+                { this->primaryThrust_=thrust; }      
+            // place your set-functions here.
+            // - hint: auxiliary thrust, rotation thrust.
+            
+            /**
+            @brief Gets the primary thrust to the input amount.
+            @preturn The amount of thrust.
+            */
+            inline float getPrimaryThrust()
+                { return this->primaryThrust_; }
+            // place your get-functions here.
+            
+        private:
+            RocketController *myController_; //!< The controller of the Rocket.
+            
+            btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the Rocket the next tick.
+            btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the Rocket the next tick.
+            float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward. 
+            float auxilaryThrust_; //!< The amount of auxilary thrust. Used for all other movements (except for rotations).
+            float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only.
+    };
+
+}
+
+#endif /* _Rocket_H__ */
