Index: /osgVisual/trunk/include/object/visual_object.h
===================================================================
--- /osgVisual/trunk/include/object/visual_object.h	(revision 225)
+++ /osgVisual/trunk/include/object/visual_object.h	(revision 226)
@@ -77,4 +77,6 @@
 	#include <leakDetection.h>
 public:
+	//META_Object(osgVisual,visual_object);
+
 	/**
 	 * \brief Constuctor: Adds this object to the scenegraph,
@@ -93,4 +95,13 @@
 
 	static visual_object* createNodeFromXMLConfig(osg::CoordinateSystemNode* sceneRoot_, xmlNode* a_node);
+
+	/**
+	 * \brief This functions searches in the scene graph for a node with a tracking ID
+	 * 
+	 * @param trackingID : Id to search for.
+	 * @param currNode_ : Scene graph to search in.
+	 * @return : Pointer to the first found node, otherwise NULL.
+	 */ 
+	static osg::Node* findNodeByTrackingID(int trackingID, osg::Node* currNode_);
 
 
Index: /osgVisual/trunk/include/util/visual_util.h
===================================================================
--- /osgVisual/trunk/include/util/visual_util.h	(revision 225)
+++ /osgVisual/trunk/include/util/visual_util.h	(revision 226)
@@ -34,4 +34,6 @@
 #include <osgUtil/LineSegmentIntersector>
 
+
+
 #ifdef FUNFUNCTIONS_ENABLED
 #ifdef WIN32
Index: /osgVisual/trunk/src/core/visual_core.cpp
===================================================================
--- /osgVisual/trunk/src/core/visual_core.cpp	(revision 225)
+++ /osgVisual/trunk/src/core/visual_core.cpp	(revision 226)
@@ -288,7 +288,14 @@
 				if(cur_node->type == XML_ELEMENT_NODE && name == "trackmodel")
 				{
-					// Extract model to track
-
-					trackNode( testObj4 );
+					// Extract track-ID and track the model
+					xmlAttr  *attr = cur_node->properties;
+					while ( attr ) 
+					{ 
+						std::string attr_name=reinterpret_cast<const char*>(attr->name);
+						std::string attr_value=reinterpret_cast<const char*>(attr->children->content);
+						if( attr_name == "id" ) trackNode( util::strToInt(attr_value) );
+						attr = attr->next; 
+					}
+					
 				}
 			}
@@ -543,5 +550,5 @@
 void visual_core::trackNode( int trackingID )
 {
-	osg::Node tmp = util::findNodeByTrackingID(trackingID);
+	osg::ref_ptr<osg::Node> tmp = visual_object::findNodeByTrackingID(trackingID, rootNode);
 	if(tmp.valid())
 		trackNode(tmp);
Index: /osgVisual/trunk/src/object/visual_object.cpp
===================================================================
--- /osgVisual/trunk/src/object/visual_object.cpp	(revision 225)
+++ /osgVisual/trunk/src/object/visual_object.cpp	(revision 226)
@@ -308,4 +308,51 @@
 }
 
+osg::Node* visual_object::findNodeByTrackingID(int trackingID, osg::Node* currNode_)
+{
+	osg::Group* currGroup;
+   osg::Node* foundNode;
+
+   // check to see if we have a valid (non-NULL) node.
+   // if we do have a null node, return NULL.
+   if ( !currNode_)
+   {
+      return NULL;
+   }
+
+   // We have a valid node, check to see if this is the node we 
+   // are looking for. If so, return the current node.
+   if (currNode_->className() == "visual_object")
+   {
+	   //Check if it is the right tracking Id
+		osgVisual::visual_object* tmp = dynamic_cast<osgVisual::visual_object*>(currNode_);
+		if(tmp && tmp->getTrackingId()==trackingID)
+			return currNode_;
+   }
+
+   // We have a valid node, but not the one we are looking for.
+   // Check to see if it has children (non-leaf node). If the node
+   // has children, check each of the child nodes by recursive call.
+   // If one of the recursive calls returns a non-null value we have
+   // found the correct node, so return this node.
+   // If we check all of the children and have not found the node,
+   // return NULL
+   currGroup = currNode_->asGroup(); // returns NULL if not a group.
+   if ( currGroup ) 
+   {
+      for (unsigned int i = 0 ; i < currGroup->getNumChildren(); i ++)
+      { 
+         foundNode = findNodeByTrackingID( trackingID, currGroup->getChild(i));
+         if (foundNode)
+		 {
+			 std::cout << "Node gefunden in Ebene: " << i << std::endl;
+            return foundNode; // found a match!
+		}
+      }
+      return NULL; // We have checked each child node - no match found.
+   }
+   else 
+      return NULL; // leaf node, no match 
+}
+
 void visual_object::setNewPositionAttitude( double lat_, double lon_, double alt_, double azimuthAngle_psi_, double pitchAngle_theta_, double bankAngle_phi_ )
 {
Index: /osgVisual/trunk/src/util/visual_util.cpp
===================================================================
--- /osgVisual/trunk/src/util/visual_util.cpp	(revision 225)
+++ /osgVisual/trunk/src/util/visual_util.cpp	(revision 226)
@@ -237,7 +237,5 @@
    }
    else 
-   {
-      return NULL; // leaf node, no match 
-   }
+	   return NULL; // leaf node, no match 
 }
 
