Index: code/branches/radarDreiD/data/levels/radar3D_test.oxw
===================================================================
--- code/branches/radarDreiD/data/levels/radar3D_test.oxw	(revision 9787)
+++ code/branches/radarDreiD/data/levels/radar3D_test.oxw	(revision 9792)
@@ -32,5 +32,5 @@
 
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-    <SpawnPoint team=0 position="-500,0,0" lookat="-500,0,1" spawnclass=SpaceShip pawndesign=spaceshipescort />
+    <SpawnPoint team=0 position="-500,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
     
 
Index: code/branches/radarDreiD/src/libraries/util/Math.cc
===================================================================
--- code/branches/radarDreiD/src/libraries/util/Math.cc	(revision 9787)
+++ code/branches/radarDreiD/src/libraries/util/Math.cc	(revision 9792)
@@ -204,5 +204,5 @@
             Examples:
              -
-        */
+    */
     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)
     {
@@ -222,5 +222,68 @@
     	   		}
 
-
+    	// perform a coordinate transformation to get distance in relation of the position of the ship
+    	orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
+
+    	// calculate 2D vector on the map (with angle between x/z - plain and line of sight)
+    	float xcoordinate = distanceShip.z; // z; cause x direction on screen is to the right side
+    	float ycoordinate = distanceShip.x*sin(mapangle)+distanceShip.y*cos(mapangle);
+    	return orxonox::Vector2(xcoordinate , ycoordinate);
+    }
+
+    /**
+               @brief Gets if a object is over the x/z - plain on map
+               @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
+               @return If distancevector to the other object has a positive y-coordinate
+
+               Examples:
+                Returns true if object is over x/z - plain
+                Returns false if object is below x/z -plain
+    */
+    bool isObjectHigherThanShipOnMap(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle)
+    {
+    	// Orxonox Vectors: x_direction you are looking, y_direction points up, z_direction points to the right
+    	orxonox::Vector3 distance = otherposition - myposition;
+
+    	// new coordinate system:	x_axsis:	mydirection		(points front)
+    	//							y_axsis:	myorthonormal	(points up)
+       	//							z_axsis:	myside			(points right)
+
+       	orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get vector from Ship to object
+
+
+       	// perform a coordinate transformation to get distance in relation of the position of the ship
+       	orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
+
+       	if(distanceShip.y >= 0)
+       		return true;
+       	else
+       		return false;
+    }
+
+
+    /**
+                @brief Gets the new vector after a coordinate transformation
+                @param distance Vector which will be transformed
+                @param mydirection New x basevector
+                @param myorthonormal New y basevector
+                @param otherposition New z basevector
+                @return direction in the new coordinates
+
+                x is vector in old coordinates
+                y is vector in old coordinates
+                T is transform matrix with:
+                	T = (t1 , t2 , t3)
+                	t1 = mydirection
+                	t2 = myorthonormal
+                	t3 = myside
+
+                y = T^(-1)*x
+            */
+    orxonox::Vector3 getTransformedVector(const orxonox::Vector3& distance, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& myside)
+    {
     	// inverse of the transform matrix
     	float determinant = +mydirection.x * (myorthonormal.y*myside.z - myside.y*myorthonormal.z)
@@ -250,20 +313,6 @@
     	distanceShip.z = xinvtransform.z * distance.x + yinvtransform.z * distance.y + zinvtransform.z * distance.z;
 
-    	// cap vector for map if its to long
-    	//distance.x = clamp<float>(distance.x, -detectionlimit/5, detectionlimit/5);
-    	//distance.y = clamp<float>(distance.y, -detectionlimit/5, detectionlimit/5);
-    	//distance.z = clamp<float>(distance.z, -detectionlimit/5, detectionlimit/5);
-    	//float distancelength = distance.length();
-
-
-    	// project vector for the rotated 3DMap on screen
-    	//float xcoordinate = distance.z;
-    	//float ycoordinate = distance.y;
-
-    	float xcoordinate = distanceShip.z; // z; cause z direction is to the side
-    	float ycoordinate = distanceShip.x*sin(mapangle)+distanceShip.y*cos(mapangle);// -; cause on screen y coordinate points down
-    	return orxonox::Vector2(xcoordinate , ycoordinate);
-    }
-
+    	return distanceShip;
+    }
 
     /**
Index: code/branches/radarDreiD/src/libraries/util/Math.h
===================================================================
--- code/branches/radarDreiD/src/libraries/util/Math.h	(revision 9787)
+++ code/branches/radarDreiD/src/libraries/util/Math.h	(revision 9792)
@@ -93,4 +93,6 @@
     _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& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit);
+    _UtilExport bool isObjectHigherThanShipOnMap(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle);
+    _UtilExport orxonox::Vector3 getTransformedVector(const orxonox::Vector3& distance, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& myside);
     _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 9787)
+++ code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc	(revision 9792)
@@ -166,4 +166,6 @@
             // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda)
             float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
+
+
             it->second->setDimensions(size, size);
 
@@ -171,10 +173,14 @@
             //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, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), 0.6435011, detectionLimit_);
-            if(coord.y < 0)
-            	{
-            	orxonox::ColourValue color = it->second->getColour();
-            	color.a = 0.5f;
-            	it->second->setColour(color);
-            	}
+
+            // set zOrder on screen
+            bool overXZPlain = isObjectHigherThanShipOnMap(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), 0.6435011);
+
+            if(overXZPlain == false && (it->second->getZOrder() >  100 * this->overlay_->getZOrder())) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
+            	it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 1);
+            if(overXZPlain == true && (it->second->getZOrder() <= 100 * this->overlay_->getZOrder()))
+            	it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 1);
+
+
 
             coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
