Index: code/branches/radarDreiD/src/libraries/util/Math.cc
===================================================================
--- code/branches/radarDreiD/src/libraries/util/Math.cc	(revision 9719)
+++ code/branches/radarDreiD/src/libraries/util/Math.cc	(revision 9740)
@@ -196,4 +196,5 @@
             @param myposition My position
             @param mydirection My viewing direction
+            @param myorthonormal My orthonormalvector (pointing upwards through my head)
             @param otherposition The position of the other object
             @param mapangle The angle you look on the 3Dmap
@@ -204,17 +205,39 @@
              -
         */
-    orxonox::Vector2 get3DProjection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit)
+    orxonox::Vector2 get3DProjection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit)
     {
     	//
     	orxonox::Vector3 distance = otherposition - myposition;
 
-    	// project difference vector on our plane
-    	orxonox::Vector3 projection = Ogre::Plane(mydirection, myposition).projectVector(distance);
-
-    	//float projectionlength = projection.length();
-
-    	// project vector for the rotated 3DMap
-    	float xcoordinate = projection.y/(2*detectionlimit);
-    	float ycoordinate = (projection.x*sin(mapangle)+projection.z*cos(mapangle))/(2*detectionlimit);
+    	// new coordinate system base y_coordinate
+    	orxonox::Vector3 myside = -mydirection.crossProduct(myorthonormal);
+
+    	// inverse of the transform matrix
+    	float determinant = +mydirection.x * (myside.y*myorthonormal.z - myorthonormal.y*myside.z)
+    						-mydirection.y * (myside.x*myorthonormal.z - myside.z*myorthonormal.x)
+    						+mydirection.z * (myside.x*myorthonormal.y - myside.y*myorthonormal.x);
+    	float invdet = 1/determinant;
+    	orxonox::Vector3 xinvtransform;
+    	orxonox::Vector3 yinvtransform;
+    	orxonox::Vector3 zinvtransform;
+
+    	xinvtransform.x =  (myside.y      * myorthonormal.z - myorthonormal.y * myside.z       )*invdet;
+    	xinvtransform.y = -(mydirection.y * myorthonormal.z - mydirection.z   * myorthonormal.y)*invdet;
+    	xinvtransform.z =  (mydirection.y * myside.z        - mydirection.z   * myside.y       )*invdet;
+    	yinvtransform.x = -(myside.x      * myorthonormal.z - myside.z        * myorthonormal.x)*invdet;
+    	yinvtransform.y =  (mydirection.x * myorthonormal.z - mydirection.z   * myorthonormal.x)*invdet;
+    	yinvtransform.z = -(mydirection.x * myside.z        - myside.x        * mydirection.z  )*invdet;
+    	zinvtransform.x =  (myside.x      * myorthonormal.y - myorthonormal.x * myside.y       )*invdet;
+    	zinvtransform.y = -(mydirection.x * myorthonormal.y - myorthonormal.x * mydirection.y  )*invdet;
+    	zinvtransform.z =  (mydirection.x * myside.y        - myside.x        * mydirection.x  )*invdet;
+
+    	// coordinate transformation
+    	distance.x = (xinvtransform.x + yinvtransform.x + zinvtransform.x) * distance.x;
+    	distance.y = (xinvtransform.y + yinvtransform.y + zinvtransform.y) * distance.y;
+    	distance.z = (xinvtransform.z + yinvtransform.z + zinvtransform.z) * distance.z;
+
+    	// project vector for the rotated 3DMap on screen
+    	float xcoordinate = distance.y/(2*detectionlimit);
+    	float ycoordinate = (distance.x*sin(mapangle)+distance.z*cos(mapangle))/(2*detectionlimit);
     	return orxonox::Vector2(xcoordinate , ycoordinate);
     }
Index: code/branches/radarDreiD/src/libraries/util/Math.h
===================================================================
--- code/branches/radarDreiD/src/libraries/util/Math.h	(revision 9719)
+++ code/branches/radarDreiD/src/libraries/util/Math.h	(revision 9740)
@@ -92,5 +92,5 @@
     _UtilExport orxonox::Vector2 get2DViewdirection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
     _UtilExport orxonox::Vector2 get2DViewcoordinates(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition);
-    _UtilExport orxonox::Vector2 get3DProjection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit);
+    _UtilExport orxonox::Vector2 get3DProjection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit);
     _UtilExport orxonox::Vector3 getPredictedPosition(const orxonox::Vector3& myposition, float projectilespeed, const orxonox::Vector3& targetposition, const orxonox::Vector3& targetvelocity);
 
Index: code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc	(revision 9719)
+++ code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc	(revision 9740)
@@ -64,5 +64,5 @@
         this->shapeMaterials_[RadarViewable::Triangle] = "RadarTriangle.png";
         this->shapeMaterials_[RadarViewable::Square]   = "RadarSquare.png";
-        this->setDetectionLimit( 1000.0f );
+        this->setDetectionLimit( 3000.0f );
         this->owner_ = 0;
     }
@@ -170,5 +170,5 @@
             // calc position on radar...
             //Vector2 coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
-            Vector2 coord = get3DProjection(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, wePointer->getWorldPosition(), 0.6435011, detectionLimit_);
+            Vector2 coord = get3DProjection(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), 0.6435011, detectionLimit_);
             coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
             it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
