Index: /branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc	(revision 6508)
+++ /branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.cc	(revision 6509)
@@ -129,14 +129,15 @@
   xMouse = yMouse = 0;
   mouseSensitivity = 0.001;
-  airViscosity = 1.0;
-  cycle = 0.0;
+  airViscosity = 0.95;
+//  cycle = 0.0;
 
   this->setMaxEnergy(100);
   this->setEnergy(80);
 
-  travelSpeed = 15.0;
-  acceleration = 5.0;
+  travelSpeed = 40.0;
+  acceleration = 3;
   this->velocity = this->getAbsDirX()*travelSpeed;
   this->mouseDir = this->getAbsDir();
+  this->pitchDir = this->getAbsDir();
 
 //   GLGuiButton* button = new GLGuiPushButton();
@@ -276,6 +277,6 @@
   this->calculateVelocity(time);
 
-  Vector move = velocity.getNormalized()*travelSpeed;
-
+  Vector move = velocity*time;
+  
   //orient the velocity in the direction of the spaceship.
   travelSpeed = velocity.len();
@@ -290,5 +291,11 @@
 
   // this is the air friction (necessary for a smooth control)
-  if(velocity.len() != 0) velocity -= velocity*0.01;
+  if(travelSpeed != 0) velocity -= velocity.getNormalized()*travelSpeed*travelSpeed*0.0005;
+  
+  //other physics (gravity)
+  if((this->getAbsDirY()).y*travelSpeed < 60 && (this->getAbsDirY()).y>0)
+  move += Vector(0,-1,0)*120*time + Vector(0,2,0)*(this->getAbsDirY()).y*travelSpeed*time;
+  if((this->getAbsDirY()).y*travelSpeed < 60 && (this->getAbsDirY()).y<0)
+  move += Vector(0,-1,0)*120*time - Vector(0,2,0)*(this->getAbsDirY()).y*travelSpeed*time;
 
   //hoover effect
@@ -302,5 +309,5 @@
   //SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
 
-  this->shiftCoor (move);
+  this->shiftCoor(move);
 
   this->getWeaponManager()->tick(time);
@@ -315,5 +322,5 @@
 void SpaceShip::calculateVelocity (float time)
 {
-  //Vector accel(0.0, 0.0, 0.0);
+  Vector accel(0.0, 0.0, 0.0);
   /*
   Vector rot(0.0, 0.0, 0.0); // wird benötigt für Helicopter
@@ -323,5 +330,5 @@
   /* calculate the direction in which the craft is heading  */
 
-  Plane plane(Vector(0,1,0), Vector(0,0,0));
+  //Plane plane(Vector(0,1,0), Vector(0,0,0));
 
   if( this->bUp )
@@ -329,10 +336,7 @@
      //this->shiftCoor(this->getAbsDirX());
       //accel += (this->getAbsDirX())*2;
-      if(travelSpeed < 30) travelSpeed += acceleration*time;
-
-      /* Heli-Steuerung
-         accel += (this->getAbsDirX()*2;
-         if(
-      */
+      
+      accel += (this->getAbsDirX())*3*acceleration;
+
    }
 
@@ -341,5 +345,5 @@
      //this->shiftCoor((this->getAbsDirX())*-1);
      //accel -= (this->getAbsDirX())*2;
-     if(travelSpeed >= 0) travelSpeed -= acceleration*time;
+     accel -= (this->getAbsDirX())*3*acceleration;
    }
 
@@ -399,5 +403,5 @@
   }
 
-  //velocity += accel;
+  velocity += accel;
   //rot.normalize();
   //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
@@ -442,5 +446,15 @@
     this->xMouse = event.xRel;
     this->yMouse = event.yRel;
-    mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1)));
+    
+    int controlVelocity = 150;
+    
+    if (xMouse > controlVelocity) xMouse = controlVelocity;
+    else if (xMouse < -controlVelocity) xMouse = -controlVelocity;
+    if (yMouse > controlVelocity) yMouse = controlVelocity;
+    else if (yMouse < -controlVelocity) yMouse = -controlVelocity;
+    
+    //pitchDir *= (Quaternion(xMouse*mouseSensitivity*0.01, Vector(1,0,0)));
+    
+    mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1))*pitchDir);
    // if( xMouse*xMouse + yMouse*yMouse < 0.9)
      //this->setAbsDir(mouseDir);
Index: /branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h
===================================================================
--- /branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h	(revision 6508)
+++ /branches/spaceshipcontrol/src/world_entities/space_ships/space_ship.h	(revision 6509)
@@ -66,9 +66,10 @@
     float                 yMouse;             //!< mouse moved in y-Direction
     float                 mouseSensitivity;   //!< the mouse sensitivity
-    float                 cycle;              //!< hovercycle
+//    float                 cycle;              //!< hovercycle
 
     Vector                velocity;           //!< the velocity of the player.
     Quaternion            mouseDir;           //!< the direction where the player wants to fly
     Quaternion            rotQuat;
+    Quaternion            pitchDir;
     float                 travelSpeed;        //!< the current speed of the player (to make soft movement)
     float                 acceleration;       //!< the acceleration of the player.
