Index: code/branches/steering/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/steering/src/orxonox/controllers/NewHumanController.cc	(revision 6001)
+++ code/branches/steering/src/orxonox/controllers/NewHumanController.cc	(revision 6033)
@@ -29,6 +29,8 @@
 #include "NewHumanController.h"
 
-#include "core/input/InputManager.h"
-#include "core/input/InputState.h"
+#include <OgreRay.h>
+#include <OgreSceneQuery.h>
+#include <OgreCamera.h>
+#include <OgreSceneManager.h>
 
 #include "core/CoreIncludes.h"
@@ -53,7 +55,9 @@
         RegisterObject(NewHumanController);
 
+        overlaySize = 0.08;
+
         CrossHairOverlay = new OrxonoxOverlay(this);
         CrossHairOverlay->setBackgroundMaterial("Orxonox/Crosshair3");
-        CrossHairOverlay->setSize(Vector2(0.08,0.08));
+        CrossHairOverlay->setSize(Vector2(overlaySize,overlaySize));
         CrossHairOverlay->show();
     }
@@ -67,5 +71,5 @@
 
     void NewHumanController::tick(float dt) {
-        CrossHairOverlay->setPosition(Vector2(static_cast<float>(this->currentYaw_), static_cast<float>(this->currentPitch_)));
+        CrossHairOverlay->setPosition(Vector2(static_cast<float>(this->currentYaw_)/2*-1+.5-overlaySize/2, static_cast<float>(this->currentPitch_)/2*-1+.5-overlaySize/2));
 
         HumanController::tick(dt);
@@ -88,4 +92,62 @@
     }*/
     
+    void NewHumanController::doFire(unsigned int firemode)
+    {
+        //if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) {
+
+/*
+
+ // Get results, create a node/entity on the position
+ for ( itr = result.begin(); itr != result.end(); itr++ )
+ {
+     if (itr->movable && itr->movable->getName() == "Head")
+     {
+         soundMgr->StopSound( &jaguarSoundChannel );
+         soundMgr->PlaySound( jaguarSound, headNode, &jaguarSoundChannel );
+         break;
+     } // if
+ }
+*/
+
+            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()->getCamera()->getCameraToViewportRay(static_cast<float>(this->currentYaw_)/2*-1+.5, static_cast<float>(this->currentPitch_)/2*-1+.5);
+
+            rsq->setRay(mouseRay);
+            rsq->setSortByDistance(true);
+
+
+            Ogre::RaySceneQueryResult &result = rsq->execute();
+
+            Ogre::RaySceneQueryResult::iterator itr;
+for ( itr = result.begin(); itr != result.end(); itr++ )
+ {
+     std::cout << "distance: " << itr->distance << "  name: " << itr->movable->getName() << " type: " << itr->movable->getMovableType() << endl;
+if (itr->movable->isInScene() && itr->movable->getMovableType() == "Entity") {
+std::cout << " in scene" << endl;
+	itr->movable->getParentSceneNode()->showBoundingBox(true);
+}
+ }
+
+//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);
+
+std::cout << endl;
+/*
+            if (!result.empty()) {
+            	Ogre::RaySceneQueryResultEntry obj = result.front();
+            	std::cout << "distance: " << obj.distance << "  name: " << obj.movable->getName() << endl;
+            }
+*/
+
+
+            HumanController::localController_s->getControllableEntity()->fire(firemode);
+        //}
+//}
+    }
+
     void NewHumanController::yaw(const Vector2& value)
     {
@@ -94,5 +156,5 @@
         
         this->currentYaw_ = value.x;
-        std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl;
+        //std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl;
     }
     void NewHumanController::pitch(const Vector2& value)
@@ -102,5 +164,5 @@
         
         this->currentPitch_ = value.x;
-        std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl;
+        //std::cout << "Y: " << static_cast<float>(this->currentPitch_) << " X: " << static_cast<float>(this->currentYaw_) << endl;
     }
 
