Index: code/branches/map/src/orxonox/objects/RadarViewable.cc
===================================================================
--- code/branches/map/src/orxonox/objects/RadarViewable.cc	(revision 2942)
+++ code/branches/map/src/orxonox/objects/RadarViewable.cc	(revision 2956)
@@ -52,4 +52,5 @@
         , MapEntity_(NULL)
         , line_(NULL)
+        , isHumanShip_(false)
     {
         RegisterRootObject(RadarViewable);
@@ -69,5 +70,11 @@
     {
         delete MapNode_;
+        MapNode_=0;
         delete MapEntity_;
+        MapEntity_=0;
+        delete line_;
+        line_=0;
+        delete LineNode_;
+        LineNode_=0;
     }
 
@@ -91,5 +98,7 @@
 
             this->MapNode_->attachObject( this->MapEntity_ );
-            this->MapNode_->attachObject( this->line_ );
+
+            this->LineNode_ = this->MapNode_->createChildSceneNode();
+            this->LineNode_->attachObject( this->line_ );
         }
         else
@@ -106,6 +115,9 @@
             this->MapNode_->translate( this->getRVOrientedVelocity(), (Ogre::Node::TransformSpace)3 );
             this->MapNode_->setOrientation( this->getWorldEntity()->getOrientation() );
-Vector3 v = this->getRVWorldPosition();
-            this->line_->setPoint(1, Vector3(0,v.y,0) );
+//Vector3 v = this->getRVWorldPosition();
+            //this->line_->setPoint(1, Vector3(0,v.y,0) );
+            this->line_->setPoint(1, Vector3(0, -this->getRVWorldPosition().y ,0) );
+            this->line_->update();
+            this->LineNode_->setDirection(Vector3::UNIT_Y,Ogre::Node::TS_WORLD,Vector3::UNIT_Y);
         }
     }
Index: code/branches/map/src/orxonox/objects/RadarViewable.h
===================================================================
--- code/branches/map/src/orxonox/objects/RadarViewable.h	(revision 2942)
+++ code/branches/map/src/orxonox/objects/RadarViewable.h	(revision 2956)
@@ -101,6 +101,13 @@
         Ogre::Entity * MapEntity_;
         DynamicLines* line_;
+        Ogre::SceneNode * LineNode_;
         void addMapEntity();
         void updateMapPosition();
+        bool isHumanShip_;
+        inline std::string getUniqueId()
+        {
+            return this->uniqueId_;
+        }
+
     private:
         void validate(const WorldEntity* object) const
@@ -113,7 +120,9 @@
         }
 
+        //Map
+        std::string uniqueId_;
         
-        std::string uniqueId_;
 
+        //Radar
         float radarObjectCamouflage_;
         Shape radarObjectShape_;
Index: code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2942)
+++ code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2956)
@@ -75,4 +75,6 @@
 
         this->registerVariables();
+
+        this->isHumanShip_ = this->hasLocalController();
     }
 
@@ -291,4 +293,12 @@
     }
 
+    //Tell the Map (RadarViewable), if this is a playership
+    void Pawn::startLocalHumanControl()
+    {
+//        SUPER(ControllableEntity, changedPlayer());
+        ControllableEntity::startLocalHumanControl();
+        this->isHumanShip_ = true;
+    }
+
 
     ///////////////////
Index: code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2942)
+++ code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.h	(revision 2956)
@@ -108,4 +108,6 @@
 
             virtual void dropItems();
+            
+            virtual void startLocalHumanControl();
 
         protected:
Index: code/branches/map/src/orxonox/overlays/map/Map.cc
===================================================================
--- code/branches/map/src/orxonox/overlays/map/Map.cc	(revision 2942)
+++ code/branches/map/src/orxonox/overlays/map/Map.cc	(revision 2956)
@@ -61,20 +61,33 @@
     CreateFactory(Map);
     SetConsoleCommand(Map, openMap, true);
-    SetConsoleCommand(Map, rotateYaw, true).setAsInputCommand();
-    SetConsoleCommand(Map, rotatePitch, true).setAsInputCommand();
+    //SetConsoleCommand(Map, rotateYaw, true).setAsInputCommand();
+    //SetConsoleCommand(Map, rotatePitch, true).setAsInputCommand();
+    SetConsoleCommand(Map, Zoom, true).setAsInputCommand();
 
     Map* Map::singletonMap_s = 0;
-    
+    Ogre::SceneManager* Map::mapSceneM_s = 0;
+    //int Map::mouseLookSpeed_ = 200;
+    //Ogre::SceneNode* Map::playerShipNode_ = 0;
+
+    const int PITCH=-30;
+    const int DISTANCE=200;
+
     Map::Map(BaseObject* creator) : OrxonoxOverlay(creator)
     {
         RegisterObject(Map);
         Map::singletonMap_s=this;
+        
         //Getting Scene Manager (Hack)
-        ObjectList<Scene>::iterator it = ObjectList<Scene>::begin();
-        this->sManager_ = it->getSceneManager();
-
-        this->mapSceneM_ = Ogre::Root::getSingletonPtr()->createSceneManager( Ogre::ST_GENERIC,"MapScene" );
-        rootNode_ = mapSceneM_->getRootSceneNode();
-        
+        if( !sManager_ )
+        {
+            ObjectList<Scene>::iterator it = ObjectList<Scene>::begin();
+            this->sManager_ = it->getSceneManager();
+        }
+        if( !Map::getMapSceneManager() )
+        {
+            Map::setMapSceneManager( Ogre::Root::getSingletonPtr()->createSceneManager( Ogre::ST_GENERIC,"MapScene" ) );
+        }
+        
+        this->playerShipNode_ = 0;
         //this->sNode_ = new Ogre::SceneNode(sManager_);
         //oManager_ = Ogre::OverlayManager::getSingletonPtr();
@@ -85,15 +98,15 @@
         //this->isVisible_=false;
         //overlay_->hide();
-        
+        this->mouseLookSpeed_ = 200;
 
         //TestEntity
-        //Ogre::Entity * ent = mapSceneM_->createEntity("ent", "drone.mesh");
-        
-        //rootNode_->attachObject( ent );
+        //Ogre::Entity * ent = mapSceneM_s->createEntity("ent", "drone.mesh");
+        
+        //Map::getMapSceneManager()->getRootSceneNode()->attachObject( ent );
         /*sNode_->setPosition(0,0,-50);
         overlay_->add3D(sNode_);
         */
 	
-        this->mouseLookSpeed_ = 200;
+        
         
 
@@ -101,12 +114,15 @@
         // Alter the camera aspect ratio to match the viewport
         //mCamera->setAspectRatio(Real(vp->getActualWidth()) / Real(vp->getActualHeight()));
-        mReflectCam_ = mapSceneM_->createCamera("ReflectCam");
-        mReflectCam_->setPosition(200,170, -160);
-        mReflectCam_->lookAt(0,0,0);
-        mReflectCam_->setAspectRatio(1);
+        Cam_ = Map::getMapSceneManager()->createCamera("ReflectCam");
+        //Cam_->setPosition(200,170, -160);
+        //Cam_->lookAt(0,0,0);
+        Cam_->setAspectRatio(1);
+        //Cam_->setRenderingDistance(0);
+        CamNode_ = Map::getMapSceneManager()->getRootSceneNode()->createChildSceneNode();
+        
 
         //Create overlay material
         std::string camMat_id = "RttMat";
-        Ogre::MaterialPtr material = this->createRenderCamera(mReflectCam_, camMat_id);
+        Ogre::MaterialPtr material = this->createRenderCamera(Cam_, camMat_id);
 /*
         Ogre::TexturePtr rttTex = Ogre::TextureManager::getSingleton().createManual("RttTex", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, Ogre::TEX_TYPE_2D, 512, 512, 0, Ogre::PF_R8G8B8, Ogre::TU_RENDERTARGET);
@@ -114,5 +130,5 @@
         Ogre::RenderTexture *renderTexture = rttTex->getBuffer()->getRenderTarget();
 
-        renderTexture->addViewport(mReflectCam_);
+        renderTexture->addViewport(Cam_);
         renderTexture->getViewport(0)->setClearEveryFrame(true);
         renderTexture->getViewport(0)->setBackgroundColour(ColourValue::Black);
@@ -154,6 +170,6 @@
 
         //Create plane in map
-        Ogre::Entity* plane_ent = this->mapSceneM_->createEntity( "MapPlane", "plane.mesh");
-        Ogre::SceneNode* plane_node = this->mapSceneM_->getRootSceneNode()->createChildSceneNode();
+        Ogre::Entity* plane_ent = Map::getMapSceneManager()->createEntity( "MapPlane", "plane.mesh");
+        planeNode_ = Map::getMapSceneManager()->getRootSceneNode()->createChildSceneNode();
         
         //Ogre::MaterialPtr plane_mat = Ogre::MaterialManager::getSingleton().create("mapgrid", "General");
@@ -161,6 +177,6 @@
         //plane_ent->setMaterialName("mapgrid");
         plane_ent->setMaterialName("Map/Grid");
-        plane_node->attachObject(plane_ent);
-        plane_node->scale(10,1,10);
+        planeNode_->attachObject(plane_ent);
+        planeNode_->scale(10,1,10);
         //Ogre::Material plane_mat = Ogre::MaterialManager::getSingletonPtr()->getByName("rock");
         
@@ -178,10 +194,17 @@
     Map::~Map()
     {
-        singletonMap_s = 0;
+        this->singletonMap_s = 0;
+        /*if (this->isInitialized())
+        {
         //delete sManager_;
-        //delete rootNode_;
+        //delete Map::getMapSceneManager()->getRootSceneNode();
         //delete oManager_;
-        //delete mReflectCam_;
-        //delete mapSceneM_;
+        //delete CamNode_;
+        //delete Cam_;
+        //delete mapSceneM_s;
+        //Map::getMapSceneManager()->destroyAllEntities();
+        //Map::getMapSceneManager()->destroyAllCameras();
+        delete Map::getMapSceneManager();
+        }*/
     }
 
@@ -208,5 +231,5 @@
     {
 
-//Ogre::Entity * ent;// = mapSceneM_->createEntity("ent1", "drone.mesh");
+//Ogre::Entity * ent;// = mapSceneM_s->createEntity("ent1", "drone.mesh");
        for(ObjectList<orxonox::RadarViewable>::iterator it = ObjectList<orxonox::RadarViewable>::begin();
             it!=ObjectList<orxonox::RadarViewable>::end();
@@ -218,5 +241,5 @@
             if( !(it->MapNode_) )
             {
-                it->MapNode_ = rootNode_->createChildSceneNode( it->getRVWorldPosition() );
+                it->MapNode_ = Map::getMapSceneManager()->getRootSceneNode()->createChildSceneNode( it->getRVWorldPosition() );
                 //it->MapNode_->translate( it->getRVOrientedVelocity(), Ogre::TS_WORLD );
                 /*if(it->getRadarObjectShape() == RadarViewable::Dot)
@@ -224,5 +247,5 @@
                     //if( !(it->MapEntity_) )//check wether the entity is already attached
                     //{
-                        //it->MapEntity_ = this->mapSceneM_->createEntity( getUniqueNumberString(), "drone.mesh");
+                        //it->MapEntity_ = Map::getMapSceneManager()->createEntity( getUniqueNumberString(), "drone.mesh");
                         //it->addEntity();
                         //it->MapNode_->attachObject( it->MapEntity_ );
@@ -234,13 +257,29 @@
 
             it->updateMapPosition();
-
-
-
             
-        
+
+
+            if(it->isHumanShip_ && it->MapNode_ != this->playerShipNode_)
+            {
+                this->playerShipNode_ = it->MapNode_;
+                this->planeNode_->getParent()->removeChild(this->planeNode_);
+                this->playerShipNode_->addChild(this->planeNode_);
+                this->CamNode_->getParent()->removeChild(this->CamNode_);
+                this->playerShipNode_->addChild(this->CamNode_);
+                this->CamNode_->attachObject(this->Cam_);
+                //this->CamNodeHelper_ = this->CamNode_->createChildSceneNode();
+                //this->CamNodeHelper_->attachObject(this->Cam_);
+                this->Cam_->setPosition(0, 0, DISTANCE);
+                this->Cam_->pitch( (Degree)PITCH );
+                //this->CamNodeHelper_->lookAt(Vector3(0,0,0), Ogre::Node::TS_PARENT);
+                this->Cam_->setAutoTracking(true, this->playerShipNode_);
+            }
             
-        }
-    }
-
+            
+        }
+    }
+    
+
+    
     void Map::XMLPort(Element& xmlElement, XMLPort::Mode mode)
     {
@@ -254,5 +293,5 @@
         {
             //COUT(0) << "foo";
-            this->getOwner()->getReverseCamera()->attachCamera(this->mReflectCam_);
+            this->getOwner()->getReverseCamera()->attachCamera(this->Cam_);
         }
     }
@@ -297,5 +336,5 @@
         if( this->isVisible_ )
             updatePositions();
-        //mReflectCam_->roll(Degree(1));
+        //Cam_->roll(Degree(1));
         
     }
@@ -303,17 +342,36 @@
     void Map::rotateYaw(const Vector2& value)
     {
-        //if (this->bMouseLook_)
-            //this->mReflectCam_->yaw(Radian(value.y * this->mouseLookSpeed_), Ogre::Node::TS_LOCAL);
-        if(Map::singletonMap_s)
-            singletonMap_s->mReflectCam_->setOrientation(singletonMap_s->mReflectCam_->getOrientation() * Quaternion( (Degree)(value.y * singletonMap_s->mouseLookSpeed_) , Vector3::UNIT_Y));
+        if(!( Map::singletonMap_s && Map::singletonMap_s->CamNode_ ))
+            return;
+
+/*
+        singletonMap_s->CamNode_->setOrientation(singletonMap_s->CamNode_->getOrientation() * Quaternion( (Degree)(-value.y * singletonMap_s->mouseLookSpeed_) , singletonMap_s->playerShipNode_->getLocalAxes().GetColumn(1) ));
+
+        Map::singletonMap_s->CamNodeHelper_->setDirection(Vector3::UNIT_Y, Ogre::Node::TS_PARENT, Vector3::UNIT_Y);
+        Map::singletonMap_s->CamNodeHelper_->lookAt(Vector3(0,0,0), Ogre::Node::TS_PARENT);
+*/
+        singletonMap_s->CamNode_->yaw( (Degree)(-value.y * singletonMap_s->mouseLookSpeed_), Ogre::Node::TS_PARENT);
     }
 
     void Map::rotatePitch(const Vector2& value)
     {
-        //if (this->bMouseLook_)
-            //this->mReflectCam_->pitch(Radian(value.y * this->mouseLookSpeed_), Ogre::Node::TS_LOCAL);
-        if(Map::singletonMap_s)
-            singletonMap_s->mReflectCam_->setOrientation(singletonMap_s->mReflectCam_->getOrientation() * Quaternion( (Degree)(-value.y * singletonMap_s->mouseLookSpeed_) , Vector3::UNIT_X));
-    }
-    
+        if(!( Map::singletonMap_s && Map::singletonMap_s->CamNode_ ))
+            return;
+            //singletonMap_s->Cam_->setOrientation(singletonMap_s->Cam_->getOrientation() * Quaternion( (Degree)(-value.y * singletonMap_s->mouseLookSpeed_) , Vector3::UNIT_X));
+/*        singletonMap_s->CamNode_->setOrientation(singletonMap_s->CamNode_->getOrientation() * Quaternion( (Degree)(-value.y * singletonMap_s->mouseLookSpeed_) , singletonMap_s->playerShipNode_->getLocalAxes().GetColumn(0) ));
+
+        Map::singletonMap_s->CamNodeHelper_->setDirection(Vector3::UNIT_Y, Ogre::Node::TS_PARENT, Vector3::UNIT_Y);
+        Map::singletonMap_s->CamNodeHelper_->lookAt(Vector3(0,0,0), Ogre::Node::TS_PARENT);
+*/
+        singletonMap_s->CamNode_->pitch( (Degree)(value.y * singletonMap_s->mouseLookSpeed_), Ogre::Node::TS_PARENT);
+        
+    }
+    
+    void Map::Zoom(const Vector2& value)
+    {
+        if(!( Map::singletonMap_s && Map::singletonMap_s->CamNode_ ))
+            return;
+        //COUT(0) << value.y << std::endl;
+        Map::singletonMap_s->Cam_->setPosition(0,0, Map::singletonMap_s->Cam_->getPosition().z + value.y * Map::singletonMap_s->mouseLookSpeed_ );
+    }
  }
Index: code/branches/map/src/orxonox/overlays/map/Map.h
===================================================================
--- code/branches/map/src/orxonox/overlays/map/Map.h	(revision 2942)
+++ code/branches/map/src/orxonox/overlays/map/Map.h	(revision 2956)
@@ -64,9 +64,10 @@
         static void openMap();
 
+//Not yet implemented
         static const int maxRange_s=1000;
 
         static void rotateYaw(const Vector2& value);
         static void rotatePitch(const Vector2& value);
-
+        static void Zoom(const Vector2& value);
         // variables
 
@@ -77,5 +78,5 @@
         static inline Ogre::SceneManager* getMapSceneManagerPtr()
         {
-            return Map::singletonMap_s->mapSceneM_;
+            return Map::singletonMap_s->mapSceneM_s;
         }
         static inline Map* getSingletonPtr()
@@ -84,4 +85,8 @@
         }
 
+        static inline Ogre::SceneManager* getMapSceneManager()
+        {
+            return Map::mapSceneM_s;
+        }
 
 
@@ -91,5 +96,9 @@
         void toggleVisibility();
         void updatePositions();
-        
+//        void changedPlayerNode();
+        static inline void setMapSceneManager( Ogre::SceneManager * sm)
+        {
+            Map::mapSceneM_s = sm;
+        }
 
     private: // variables
@@ -97,9 +106,13 @@
 
         Ogre::SceneManager* sManager_;
-        Ogre::SceneManager* mapSceneM_;
-        Ogre::SceneNode* rootNode_;
         Ogre::OverlayManager * oManager_;
-        Ogre::Camera* mReflectCam_;
-        //Ogre::SceneNode* playerShipNode_;
+
+        static Ogre::SceneManager* mapSceneM_s;
+        Ogre::SceneNode* CamNode_;
+        Ogre::Camera* Cam_;
+        //Ogre::SceneNode* CamNodeHelper_;
+        Ogre::SceneNode* playerShipNode_;
+        Ogre::SceneNode* planeNode_;
+        
         int mouseLookSpeed_;
         bool isVisible_;
