Index: /code/branches/steering/data/defaultConfig/keybindings.ini
===================================================================
--- /code/branches/steering/data/defaultConfig/keybindings.ini	(revision 6090)
+++ /code/branches/steering/data/defaultConfig/keybindings.ini	(revision 6091)
@@ -122,7 +122,7 @@
 KeyStop=
 KeySystemRequest=
-KeyT=
-KeyTab="cycleNavigationFocus"
-KeyU=
+KeyT=""
+KeyTab="NewHumanController changeMode"
+KeyU=""
 KeyUP="scale 1 moveFrontBack"
 KeyUnassigned="openConsole"
Index: /code/branches/steering/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- /code/branches/steering/src/orxonox/controllers/NewHumanController.cc	(revision 6090)
+++ /code/branches/steering/src/orxonox/controllers/NewHumanController.cc	(revision 6091)
@@ -45,5 +45,9 @@
 namespace orxonox
 {
+    SetConsoleCommand(NewHumanController, changeMode,          false).keybindMode(KeybindMode::OnPress);
+
     CreateUnloadableFactory(NewHumanController);
+
+    NewHumanController* NewHumanController::localController_s = 0;
 
     NewHumanController::NewHumanController(BaseObject* creator) : HumanController(creator)
@@ -63,4 +67,6 @@
         this->targetMask_.include(ClassByString("WorldEntity"));
         this->targetMask_.exclude(ClassByString("Projectile"));
+
+        NewHumanController::localController_s = this;
     }
 
@@ -119,6 +125,4 @@
         Ogre::RaySceneQuery * rsq = HumanController::localController_s->getControllableEntity()->getScene()->getSceneManager()->createRayQuery(Ogre::Ray());
 
-        //std::cout << "X: " << static_cast<float>(this->currentYaw_)/2*-1+.5 << "  Y: " << static_cast<float>(this->currentPitch_)/2*-1+.5 << endl;
-
         Ogre::Ray mouseRay = HumanController::localController_s->getControllableEntity()->getCamera()->getOgreCamera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5, static_cast<float>(this->currentPitch_)/2*-1+.5);
 
@@ -140,5 +144,4 @@
         for (itr = result.begin(); itr != result.end(); ++itr)
         {
-            //std::cout << "distance: " << itr->distance << "  name: " << itr->movable->getName() << " type: " << itr->movable->getMovableType();
             if (itr->movable->isInScene() && itr->movable->getMovableType() == "Entity" && itr->distance > 500)
             {
@@ -151,24 +154,15 @@
                         continue;
                 }
-                //std::cout << "  TAGGED";
+
                 itr->movable->getParentSceneNode()->showBoundingBox(true);
-                std::cout << itr->movable->getParentSceneNode()->_getDerivedPosition() << endl;
-                return itr->movable->getParentSceneNode()->_getDerivedPosition();
+                //std::cout << itr->movable->getParentSceneNode()->_getDerivedPosition() << endl;
+                return mouseRay.getOrigin() + mouseRay.getDirection() * itr->distance; //or itr->movable->getParentSceneNode()->_getDerivedPosition()
             }
-            //std::cout << endl;
+
         }
 
-        //if (result.front().movable->isInScene()) std::cout << "in scene" << endl;
-        // && result.front().movable->getParentSceneNode() != NULL) result.front().movable->getParentSceneNode()->showBoundingBox(true);
-        //result.front().movable->setVisible(false);
+	return mouseRay.getOrigin() + mouseRay.getDirection() * 1200;
 
-        //std::cout << endl;
-/*
-        if (!result.empty()) {
-            Ogre::RaySceneQueryResultEntry obj = result.front();
-            std::cout << "distance: " << obj.distance << "  name: " << obj.movable->getName() << endl;
-        }
-*/
-        return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 800);
+        //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getWorldOrientation() * Vector3::NEGATIVE_UNIT_Z * 2000);
         //return this->controllableEntity_->getWorldPosition() + (this->controllableEntity_->getCamera()->getOgreCamera()->getOrientation() * Vector3::NEGATIVE_UNIT_Z);
     }
@@ -177,5 +171,6 @@
     {
 //         SUPER(NewHumanController, yaw, value);
-        HumanController::yaw(value);
+        if (this->controlMode_ == 0)
+            HumanController::yaw(value);
         
         this->currentYaw_ = value.x;
@@ -186,8 +181,16 @@
     {
 //         SUPER(NewHumanController, pitch, value);
-        HumanController::pitch(value);
-        
+        if (this->controlMode_ == 0)
+            HumanController::pitch(value);
+
         this->currentPitch_ = value.x;
         //std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl;
     }
+
+    void NewHumanController::changeMode() {
+        if (NewHumanController::localController_s->controlMode_ == 0)
+            NewHumanController::localController_s->controlMode_ = 1;
+        else
+            NewHumanController::localController_s->controlMode_ = 0;
+    }
 }
Index: /code/branches/steering/src/orxonox/controllers/NewHumanController.h
===================================================================
--- /code/branches/steering/src/orxonox/controllers/NewHumanController.h	(revision 6090)
+++ /code/branches/steering/src/orxonox/controllers/NewHumanController.h	(revision 6091)
@@ -27,5 +27,5 @@
  */
 
-#ifndef _NewNewHumanController_H__
+#ifndef _NewNewHumanController_H__	
 #define _NewNewHumanController_H__
 
@@ -50,9 +50,12 @@
             virtual void doFire(unsigned int firemode);
 
-            void changeMode(unsigned int controleMode);
+            static void changeMode();
 
             virtual bool canFindTarget() { return true; }
             virtual Vector3 getTarget();
 
+        protected:
+            unsigned int                controlMode_;
+            static NewHumanController* localController_s;
         private:
             float                       currentYaw_;
@@ -60,5 +63,4 @@
             OrxonoxOverlay*             crossHairOverlay_;
             float			            overlaySize_;
-            unsigned int                controlMode_;
             ClassTreeMask               targetMask_;
     };
