Index: code/branches/physics/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/physics/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2314)
+++ code/branches/physics/src/orxonox/objects/worldentities/pawns/SpaceShip.cc	(revision 2374)
@@ -40,4 +40,5 @@
 namespace orxonox
 {
+    const float orientationGain = 100;
     CreateFactory(SpaceShip);
 
@@ -84,6 +85,5 @@
         if (this->physicalBody_)
         {
-            this->physicalBody_->setDamping(0.8, 0.9);
-            this->physicalBody_->setActivationState(DISABLE_DEACTIVATION);
+            this->physicalBody_->setDamping(0.7, 0.3);
         }
     }
@@ -106,68 +106,5 @@
     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));
-        //    else
-        //        this->pitch(Degree( this->pitchRotation_ * dt));
-        //    this->roll(this->rollRotation_ * dt);
-
-        //    this->acceleration_.x = 0;
-        //    this->acceleration_.y = 0;
-        //    this->acceleration_.z = 0;
-
-        //    this->yawRotation_   = this->zeroDegree_;
-        //    this->pitchRotation_ = this->zeroDegree_;
-        //    this->rollRotation_  = this->zeroDegree_;
-        //}
     }
 
@@ -176,5 +113,4 @@
         assert(this->physicalBody_);
         this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * btVector3(0.0f, 0.0f, -getMass() * value.x * 100));
-//        this->acceleration_.z = -this->translationAcceleration_ * value.x;
     }
 
@@ -182,5 +118,4 @@
     {
         this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * btVector3(getMass() * value.x * 100, 0.0f, 0.0f));
-//        this->acceleration_.x = this->translationAcceleration_ * value.x;
     }
 
@@ -188,38 +123,19 @@
     {
         this->physicalBody_->applyCentralForce(physicalBody_->getWorldTransform().getBasis() * btVector3(0.0f, getMass() * value.x * 100, 0.0f));
-//        this->acceleration_.y = this->translationAcceleration_ * value.x;
     }
 
     void SpaceShip::rotateYaw(const Vector2& value)
     {
-        this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * btVector3(0.0f, getMass() * value.x * 10000, 0.0f));
-        //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->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * btVector3(0.0f, 1 / this->physicalBody_->getInvInertiaDiagLocal().y() * value.y * orientationGain, 0.0f));
     }
 
     void SpaceShip::rotatePitch(const Vector2& value)
     {
-        this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * btVector3(getMass() * value.x * 10000, 0.0f, 0.0f));
-        //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->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * btVector3(1 / this->physicalBody_->getInvInertiaDiagLocal().x() * value.y * orientationGain, 0.0f, 0.0f));
     }
 
     void SpaceShip::rotateRoll(const Vector2& value)
     {
-        this->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * btVector3(0.0f, 0.0f, -getMass() * value.x * 10000));
-        //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->physicalBody_->applyTorque(physicalBody_->getWorldTransform().getBasis() * btVector3(0.0f, 0.0f, -1 / this->physicalBody_->getInvInertiaDiagLocal().z() * value.y * orientationGain));
     }
 
