Index: code/branches/Asteroid_HS17/src/modules/asteroids/AsteroidsShip.cc
===================================================================
--- code/branches/Asteroid_HS17/src/modules/asteroids/AsteroidsShip.cc	(revision 11528)
+++ code/branches/Asteroid_HS17/src/modules/asteroids/AsteroidsShip.cc	(revision 11541)
@@ -18,18 +18,24 @@
     {
         RegisterObject(AsteroidsShip);
-        /*radius = 20;
-        x = getPosition().x;
-        y = getPosition().y;
-        dx = 3.0f;
-        dy = 3.0f;
-        angle= 0.0f;*/
 
-        speed = 830;
+        angle= 0.0f;
+
+
+
         isFireing = false;
-        damping = 10;
+        damping = 0.90;
 
         lastTimeFront = 0;
         lastTimeLeft = 0;
         lastTime = 0;
+
+        height = this->getGame()->center_->getFieldHeight();
+        width = this->getGame()->center_->getFieldWidth();
+
+        force.x =0;
+        force.y =0;
+
+        velocity.x = 0;
+        velocity.y = 0;
 
     }
@@ -47,66 +53,37 @@
     void AsteroidsShip::tick(float dt)
     {
-        /*Movement computation
+        //Movement computation beachte Beschleunigung?
         Vector3 pos = getPosition();
 
-        dx *= damping;
-        dy *= damping;
-
-        float speed = sqrt(dx*dx+ dy*dy);
+        float speed = sqrt(velocity.x*velocity.x+ velocity.y*velocity.y);
         if(speed > maxspeed)
         {
-            dx *= maxspeed/speed;
-            dy *= mayspeed/speed;
+            velocity.x *= maxspeed/speed;
+            velocity.y *= mayspeed/speed;
         }
 
-        x += dx;
-        y += dy;
+        pos.x += velocity.x*dt;
+        pos.y += velocity.y*dt;
 
-        if(x>W) x=0;
-        if(x<0) x=W;
-        if(y>H) y=0;
-        if(y<0) y=H;
-        setPosition(x,y,0);
 
-        //roll? muss sich das Raumschiff drehen?
-        setOrientation(angle, x, y, 0);
+        //haelt ship innerhalb des Kamerafensters
+        if(x>width) x=0;
+        if(x<0) x=width;
+        if(y>height) y=0;
+        if(y<0) y=height);
+
 
         //Schiessen wenn geschossen wurde
         // shoot!
+/*
         if (isFireing)
             ControllableEntity::fire(0);
-        
-        //Leben verloren */
-        Vector3 pos = getPosition();
-
-        //Movement calculation
-        lastTimeFront += dt * damping;
-        lastTimeLeft += dt * damping;
-        lastTime += dt;
-
-        velocity.x = interpolate(clamp(lastTimeLeft, 0.0f, 1.0f), desiredVelocity.x, 0.0f);
-        velocity.y = interpolate(clamp(lastTimeFront, 0.0f, 1.0f), desiredVelocity.y, 0.0f);
+        */
 
         //Execute movement
         if (this->hasLocalController())
         {
-            float dist_y = velocity.y * dt;
-            //float dist_x = velocity.x * dt;
-            if(dist_y + posforeward > -42*3 && dist_y + posforeward < 42*6)
-                posforeward += dist_y;
-            else
-            {
-                velocity.y = 0;
-                // restart if game ended
-/*
-                if (getGame())
-                    if (getGame()->bEndGame)
-                    {
-                        getGame()->start();
-                        return;
-                    }*/
-            }
-
-            pos += Vector3(1000 + velocity.y, 0, velocity.x) * dt;
+            force.x += 1;
+            force.y += 1;
 
         }
@@ -118,6 +95,6 @@
         if (camera != nullptr)
         {
-            // camera->setPosition(Vector3(-pos.z, -posforeward, 0));
-            camera->setOrientation(Vector3::UNIT_Z, Degree(0));
+            camera->setPosition(Vector3(0,cameradistance, 0));
+            camera->setOrientation(Vector3::UNIT_Z, Degree(90));
         }
 
@@ -130,21 +107,25 @@
         }
 
+        velocity.x *= damping;
+        velocity.y *= damping;
+
         setPosition(pos);
         setOrientation(Vector3::UNIT_Y, Degree(270));
 
         SUPER(AsteroidsShip, tick, dt);
+
     }
 
     void AsteroidsShip::moveFrontBack(const Vector2& value)
     {
-
-
+        velocity.x += 1;
     } 
 
-    void AsteroidsShip::moveFrontBack(const Vector2& value)
+    void AsteroidsShip::moveUpDown(const Vector2& value)
     {
+        velocity.y +=1;
 
     }
-    void AsteroidsShip::moveFrontBack(const Vector2& value)
+    void AsteroidsShip::moveFrontLeftRight(const Vector2& value)
     {
 
