Index: code/branches/radarDreiD/data/overlays/HUDTemplates3.oxo
===================================================================
--- code/branches/radarDreiD/data/overlays/HUDTemplates3.oxo	(revision 9852)
+++ code/branches/radarDreiD/data/overlays/HUDTemplates3.oxo	(revision 9877)
@@ -108,22 +108,5 @@
     />
 
-<!--
-    <HUDRadar
-     name          = "Radar"
-     background    = "Orxonox/Radar"
-     correctaspect = true
-     size          = "0.17, 0.17"
-     position      = "1.0, 1.0"
-     pickpoint     = "1.0, 1.0"
-     rotation      = 0
-     sensitivity   = 1.0
-     halfDotSizeDistance = 3000
-     maximumDotSize      = 0.1
-    />
-    -->
-   
-   
-  
-    <HUDRadar
+	<HUDRadar
      name          			= "Radar"
      background    			= "Orxonox/Radar3D"
@@ -140,9 +123,8 @@
      halfDotSizeDistance 	= 3000
      maximumDotSize 		= 0.1
-     maximumDotSize3D      	= 0.07
+     maximumDotSize3D      	= 0.06
      mapAngle3D   			= 0.6435011
     />
     
-
     <HUDTimer
      name     = "Timer"
Index: code/branches/radarDreiD/src/libraries/util/Math.cc
===================================================================
--- code/branches/radarDreiD/src/libraries/util/Math.cc	(revision 9852)
+++ code/branches/radarDreiD/src/libraries/util/Math.cc	(revision 9877)
@@ -208,5 +208,5 @@
     {
     	// Orxonox Vectors: x_direction you are looking, y_direction points up, z_direction points to the right
-    	orxonox::Vector3 distance = otherposition - myposition;
+    	orxonox::Vector3 distance = otherposition - myposition;	// get vector from Ship to object
 
     	// new coordinate system:	x_axsis:	mydirection		(points front)
@@ -214,5 +214,5 @@
     	//							z_axsis:	myside			(points right)
 
-    	orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get vector from Ship to object
+    	orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get 3. base vector
 
     	distance = 4*distance / detectionlimit; // shrink vector on map
@@ -263,4 +263,30 @@
        	else
        		return false;
+    }
+
+    /**
+                   @brief A value between 0 and 10, in order how other object is in front or in back
+                   @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 detectionlimit The limit in which objects are shown on the map
+                   @return value between 0 and 100
+    */
+    int determineMap3DZOrder(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float detectionlimit)
+    {
+    	orxonox::Vector3 distance = otherposition - myposition;	// get vector from Ship to object
+    	orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); 	// get vector to the side
+
+    	distance = 4*distance / detectionlimit; // shrink vector on map
+    	if(distance.length() > 1.0f) // if object would wander outside of the map
+    	{
+    		distance = distance / distance.length();
+    	}
+
+    	// perform a coordinate transformation to get distance in relation of the position of the ship
+       	orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
+
+       	return (int) 50 - 100*distanceShip.x;
     }
 
Index: code/branches/radarDreiD/src/libraries/util/Math.h
===================================================================
--- code/branches/radarDreiD/src/libraries/util/Math.h	(revision 9852)
+++ code/branches/radarDreiD/src/libraries/util/Math.h	(revision 9877)
@@ -94,4 +94,5 @@
     _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 int determineMap3DZOrder(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float detectionlimit);
     _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 9852)
+++ code/branches/radarDreiD/src/modules/overlays/hud/HUDRadar.cc	(revision 9877)
@@ -193,6 +193,6 @@
         {
         	this->setBackgroundMaterial(material3D_);
-        	this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 10);
-        	this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 10);
+        	this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 250); // it seems that the ZOrder of overlayelements is 100 times the ZOrder of the overlay
+        	this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 250); // 250 a little bit buffer so that the two shels are displayed all in the front / in the back
         	this->map3DFront_->show();
         	this->map3DBack_->show();
@@ -235,8 +235,8 @@
             	bool overXZPlain = isObjectHigherThanShipOnMap(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), this->mapAngle_);
 
-            	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);
+            	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 - 70 + determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_));
+            	if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/)
+            		it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_));
             }
             else
