Index: /code/branches/hud3/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/hud3/src/orxonox/CMakeLists.txt	(revision 1345)
+++ /code/branches/hud3/src/orxonox/CMakeLists.txt	(revision 1346)
@@ -8,4 +8,5 @@
   hud/BarOverlayElement.cc
   hud/RadarOverlayElement.cc
+  hud/RadarObject.cc
   particle/ParticleInterface.cc
   tolua/tolua_bind.cc
Index: /code/branches/hud3/src/orxonox/hud/RadarObject.cc
===================================================================
--- /code/branches/hud3/src/orxonox/hud/RadarObject.cc	(revision 1346)
+++ /code/branches/hud3/src/orxonox/hud/RadarObject.cc	(revision 1346)
@@ -0,0 +1,69 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Felix Schulthess
+*   Co-authors:
+*      ...
+*
+*/
+
+#include "RadarObject.h"
+
+namespace orxonox
+{
+    using namespace Ogre;
+
+	int RadarObject::count = 0;		// initialize static variable
+
+	RadarObject::RadarObject(Ogre::OverlayContainer* container){
+		container_ = container;
+		pos_ = Vector3(0.0, 0.0, 0.0);
+		init();
+	}
+
+	RadarObject::RadarObject(Ogre::OverlayContainer* container, Vector3 pos){
+		container_ = container;
+		pos_ = pos;
+		init();
+	}
+
+	RadarObject::~RadarObject(){}
+
+	void RadarObject::init(){
+	    next = NULL;
+		om = &Ogre::OverlayManager::getSingleton();
+		panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
+			"Object"+Ogre::StringConverter::toString(count)));
+		panel_->setMaterialName("Orxonox/RedDot");
+		panel_->setDimensions(3,3);
+        panel_->setMetricsMode(Ogre::GMM_PIXELS);
+        panel_->show();
+        index_ = count;
+        count++;
+        container_->addChild(panel_);
+	}
+}
+
+/* my local clipboard...
+COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
+COUT(3) << firstRadarObject_->radius_ << "  " << firstRadarObject_->phi_ << std::endl;
+COUT(3) << "WWWWWWWWWWWWWWWWWWWWWWWWWWWW\n";
+*/
Index: /code/branches/hud3/src/orxonox/hud/RadarObject.h
===================================================================
--- /code/branches/hud3/src/orxonox/hud/RadarObject.h	(revision 1346)
+++ /code/branches/hud3/src/orxonox/hud/RadarObject.h	(revision 1346)
@@ -0,0 +1,66 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Yuning Chai
+*   Co-authors:
+*      ...
+*
+*/
+
+#ifndef _RADAR2_H__
+#define _RADAR2_H__
+
+#include <string.h>
+#include <OgrePrerequisites.h>
+#include <OgreOverlayManager.h>
+#include <OgreOverlayElement.h>
+#include <OgrePanelOverlayElement.h>
+#include <OgreStringConverter.h>
+
+#include <util/Math.h>
+#include "../OrxonoxPrereqs.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport RadarObject
+    {
+    	private:
+    		Ogre::OverlayManager* om;				// our one and only overlay manager
+    		void init();
+
+    	public:
+    		RadarObject(Ogre::OverlayContainer* container);
+    		RadarObject(Ogre::OverlayContainer* container, Vector3 pos);
+    		~RadarObject();
+
+            bool right_;
+            int index_;                             // index number of object
+    		Vector3 pos_;							// position in space
+			Ogre::Real radius_, phi_;				// position on radar
+			Ogre::OverlayContainer* container_;
+			Ogre::PanelOverlayElement* panel_;		// the panel used to show the dot
+			RadarObject* next;                      // next pointer of linked list
+
+    		static int count;
+	};
+}
+
+#endif
Index: /code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc
===================================================================
--- /code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc	(revision 1345)
+++ /code/branches/hud3/src/orxonox/hud/RadarOverlayElement.cc	(revision 1346)
@@ -26,20 +26,5 @@
 */
 
-/*	local coordinate system of space ship at the beginning:
-
-			y
-			+   z
-			|  +
-			| /
-			|/
-   x +------O
-*/
-
-#include <OgreOverlayManager.h>
-#include <OgreOverlayElement.h>
-#include <OgrePanelOverlayElement.h>
-#include <OgreStringConverter.h>
 #include "RadarOverlayElement.h"
-#include "GraphicsEngine.h"
 
 namespace orxonox
@@ -98,7 +83,16 @@
         // iterate through all RadarObjects
 		while(ro != NULL){
+		    // calc position on radar...
             ro->radius_ = calcRadius(ro);
             ro->phi_ = calcPhi(ro);
             ro->right_ = calcRight(ro);
+
+            // set size to fit distance...
+            float d = (ro->pos_-shipPos_).length();
+            if(d<4000) ro->panel_->setDimensions(4,4);
+            else if(d<8000) ro->panel_->setDimensions(3,3);
+            else if(d<12000) ro->panel_->setDimensions(2,2);
+            else ro->panel_->setDimensions(1,1);
+
             if (ro->right_){
                 ro->panel_->setPosition(sin(ro->phi_)*ro->radius_/
@@ -115,11 +109,9 @@
     void RadarOverlayElement::addObject(Vector3 pos){
         if(firstRadarObject_ == NULL){
-            firstRadarObject_ = new RadarObject(container_);
-            firstRadarObject_->pos_ = pos;
+            firstRadarObject_ = new RadarObject(container_, pos);
             lastRadarObject_ = firstRadarObject_;
         }
         else{
-            lastRadarObject_->next = new RadarObject(container_);
-            lastRadarObject_->next->pos_ = pos;
+            lastRadarObject_->next = new RadarObject(container_, pos);
             lastRadarObject_ = lastRadarObject_->next;
         }
@@ -155,34 +147,4 @@
         else return false;
 	}
-
-//////// RadarObject ////////
-
-	int RadarObject::count = 0;		// initialize static variable
-
-	RadarObject::RadarObject(Ogre::OverlayContainer* container){
-		container_ = container;
-		pos_ = Vector3(0.0, 0.0, 0.0);
-		init();
-	}
-
-	RadarObject::RadarObject(Ogre::OverlayContainer* container, Vector3 pos){
-		container_ = container;
-		pos_ = pos;
-		init();
-	}
-
-	RadarObject::~RadarObject(){}
-
-	void RadarObject::init(){
-	    next = NULL;
-		om = &Ogre::OverlayManager::getSingleton();
-		panel_ = static_cast<PanelOverlayElement*>(om->createOverlayElement("Panel",
-			"Object"+Ogre::StringConverter::toString(count++)));
-		panel_->setMaterialName("Orxonox/RedDot");
-		panel_->setDimensions(5,5);
-        panel_->setMetricsMode(Ogre::GMM_PIXELS);
-        panel_->show();
-        container_->addChild(panel_);
-	}
 }
 
Index: /code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h
===================================================================
--- /code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h	(revision 1345)
+++ /code/branches/hud3/src/orxonox/hud/RadarOverlayElement.h	(revision 1346)
@@ -30,36 +30,20 @@
 
 #include <string.h>
+#include <OgreOverlayManager.h>
+#include <OgreStringConverter.h>
 #include <OgreOverlayElement.h>
 #include <OgrePanelOverlayElement.h>
+#include <OgrePrerequisites.h>
+
 #include <util/Math.h>
 #include <string.h>
 #include "core/Tickable.h"
-#include <OgrePrerequisites.h>
 #include "objects/SpaceShip.h"
 #include "../OrxonoxPrereqs.h"
+#include "RadarObject.h"
+#include "GraphicsEngine.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport RadarObject
-    {
-    	private:
-    		Ogre::OverlayManager* om;				// our one and only overlay manager
-    		void init();
-
-    	public:
-    		RadarObject(Ogre::OverlayContainer* container);
-    		RadarObject(Ogre::OverlayContainer* container, Vector3 pos);
-    		~RadarObject();
-
-            bool right_;
-    		Vector3 pos_;							// position in space
-			Ogre::Real radius_, phi_;				// position on radar
-			Ogre::OverlayContainer* container_;
-			Ogre::PanelOverlayElement* panel_;		// the panel used to show the dot
-			RadarObject* next;                      // next pointer of linked list
-
-    		static int count;
-	};
-
     class _OrxonoxExport RadarOverlayElement : public Ogre::PanelOverlayElement
     {
