Index: /trunk/src/story_entities/world.cc
===================================================================
--- /trunk/src/story_entities/world.cc	(revision 6240)
+++ /trunk/src/story_entities/world.cc	(revision 6241)
@@ -341,6 +341,4 @@
   }
 
-  // bind camera
-  playable->addChild (this->localCamera);
 
 //   //localCamera->setParent(TrackNode::getInstance());
@@ -349,11 +347,9 @@
 //  localCamera->lookAt(playable);
 //  this->localPlayer->setParentMode(PNODE_ALL);
-  if (sky != NULL)
+  if (this->sky != NULL)
   {
     this->sky->setParent(this->localCamera);
     this->sky->setParentMode(PNODE_MOVEMENT);
   }
-
-  this->localCamera->getTarget()->getParent()->debugNode(0);
   SoundEngine::getInstance()->setListener(this->localCamera);
 
Index: /trunk/src/world_entities/playable.cc
===================================================================
--- /trunk/src/world_entities/playable.cc	(revision 6240)
+++ /trunk/src/world_entities/playable.cc	(revision 6241)
@@ -20,4 +20,5 @@
 #include "event_handler.h"
 #include "player.h"
+#include "state.h"
 
 
@@ -72,5 +73,5 @@
     for (ev = this->events.begin(); ev != events.end(); ev++)
       evh->subscribe(player, ES_GAME, (*ev));
-
+    this->enter();
     return true;
   }
@@ -97,4 +98,5 @@
       evh->unsubscribe( ES_GAME, (*ev));
 
+    this->leave();
     this->currentPlayer = NULL;
     return true;
@@ -127,2 +129,15 @@
 
 
+void  Playable::attachCamera()
+{
+       State::getCamera()->setParentSoft(this);
+       State::getCameraTarget()->setParentSoft(this);
+
+}
+
+
+void  Playable::detachCamera()
+{
+
+
+}
Index: /trunk/src/world_entities/playable.h
===================================================================
--- /trunk/src/world_entities/playable.h	(revision 6240)
+++ /trunk/src/world_entities/playable.h	(revision 6241)
@@ -25,6 +25,6 @@
     virtual ~Playable();
 
-    virtual void enter() {};
-    virtual void leave() {};
+    virtual void enter()=0;
+    virtual void leave()=0;
 
     virtual void addWeapon(Weapon* weapon )  {}//= 0;
@@ -34,4 +34,7 @@
     bool subscribePlayer(Player* player);
     bool unsubscribePlayer(Player* player);
+
+    void attachCamera();
+    void detachCamera();
 
     virtual void process(const Event &event) = 0;
Index: /trunk/src/world_entities/player.cc
===================================================================
--- /trunk/src/world_entities/player.cc	(revision 6240)
+++ /trunk/src/world_entities/player.cc	(revision 6241)
@@ -95,10 +95,7 @@
          if (this->controllable != (*node) && (dynamic_cast<PNode*>(*node)->getAbsCoor() - this->controllable->getAbsCoor()).len() < 10.0)
        {
-         this->controllable->leave();
+ 
          this->disconnectControllable();
          this->setControllable(dynamic_cast<Playable*>(*node));
-         this->controllable->enter();
-         State::getCamera()->setParentSoft(this->controllable);
-         State::getCameraTarget()->setParentSoft(this->controllable);
 
          break;
Index: /trunk/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /trunk/src/world_entities/space_ships/space_ship.cc	(revision 6240)
+++ /trunk/src/world_entities/space_ships/space_ship.cc	(revision 6241)
@@ -112,5 +112,5 @@
   PRINTF(4)("SPACESHIP INIT\n");
 
-//   EventHandler::getInstance()->grabEvents(true);
+  EventHandler::getInstance()->grabEvents(true);
 
   bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
@@ -193,4 +193,5 @@
 {
   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
+  this->attachCamera();
 
 
@@ -200,4 +201,5 @@
 {
   dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
+  this->detachCamera();
 
 
@@ -284,6 +286,6 @@
 
   //orient the spaceship in direction of the mouse
-   rotQuat = Quaternion::quatSlerp( this->getAbsDir(),mouseDir,fabsf(time)*3);
-   if (this->getAbsDir().distance(rotQuat) > 0.001)
+   rotQuat = Quaternion::quatSlerp( this->getAbsDir(), mouseDir, fabsf(time)*3.0);
+   if (this->getAbsDir().distance(rotQuat) > 0.00000000000001)
     this->setAbsDir( rotQuat);
    //this->setAbsDirSoft(mouseDir,5);
@@ -440,6 +442,6 @@
     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)));
-    if( xMouse*xMouse + yMouse*yMouse < 0.9)
-     this->setAbsDir(mouseDir);
+   // if( xMouse*xMouse + yMouse*yMouse < 0.9)
+     //this->setAbsDir(mouseDir);
   }
 }
Index: /trunk/src/world_entities/weapons/guided_missile.cc
===================================================================
--- /trunk/src/world_entities/weapons/guided_missile.cc	(revision 6240)
+++ /trunk/src/world_entities/weapons/guided_missile.cc	(revision 6241)
@@ -146,5 +146,6 @@
 {
 
-  if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
+  
+if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
    {
     speed = velocity.len();
@@ -152,5 +153,5 @@
 
     if(velocity.dot(diffVector) != 0)
-    {
+     {
      correctionVector = (( ( diffVector *  (speed * speed/( velocity.dot(diffVector ) ) )) - velocity).getNormalized()) * agility;
 
@@ -159,5 +160,5 @@
       else if (velocity.dot(diffVector) < 0)
         velocity -= correctionVector;
-    }
+     }
     else
       velocity += diffVector * agility;
