Index: orxonox/trunk/src/lib/collision_detection/bv_tree.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bv_tree.h	(revision 4699)
+++ orxonox/trunk/src/lib/collision_detection/bv_tree.h	(revision 4700)
@@ -15,4 +15,5 @@
 class BoundingVolume;
 class BVTreeNode;
+class PNode;
 
 typedef enum DrawMode
@@ -39,5 +40,5 @@
   virtual void flushTree() = NULL;
 
-  virtual void collideWith(BVTree* tree) = NULL;
+  virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB) = NULL;
 
   virtual void drawBV(int depth, int drawMode) const = NULL;
Index: orxonox/trunk/src/lib/collision_detection/bv_tree_node.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/bv_tree_node.h	(revision 4699)
+++ orxonox/trunk/src/lib/collision_detection/bv_tree_node.h	(revision 4700)
@@ -14,5 +14,5 @@
 class BoundingVolume;
 class BVTree;
-//struct sVec3D;
+class PNode;
 template<class T> class tList;
 
@@ -29,5 +29,5 @@
   inline const int getIndex() { return this->treeIndex; }
 
-  virtual void collideWith(BVTreeNode* treeNode) = NULL;
+  virtual void collideWith(BVTreeNode* treeNode, PNode* nodeA, PNode* nodeB) = NULL;
 
   virtual void drawBV(int depth, int drawMode) const = NULL;
Index: orxonox/trunk/src/lib/collision_detection/obb_tree.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4699)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree.cc	(revision 4700)
@@ -22,4 +22,5 @@
 #include "compiler.h"
 #include "material.h"
+#include "p_node.h"
 
 using namespace std;
@@ -103,7 +104,7 @@
 
 
-void OBBTree::collideWith(BVTree* tree)
+void OBBTree::collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB)
 {
-  this->rootNode->collideWith(((OBBTree*)tree)->getRootNode());
+  this->rootNode->collideWith(((OBBTree*)tree)->getRootNode(), nodeA, nodeB);
 }
 
Index: orxonox/trunk/src/lib/collision_detection/obb_tree.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree.h	(revision 4699)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree.h	(revision 4700)
@@ -14,4 +14,5 @@
 class Material;
 class OBBTreeNode;
+class PNode;
 
 //! A class for representing an obb tree
@@ -27,5 +28,5 @@
     virtual void flushTree();
 
-    virtual void collideWith(BVTree* tree);
+    virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB);
 
     virtual void drawBV(int depth, int drawMode) const;
Index: orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4699)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc	(revision 4700)
@@ -22,4 +22,5 @@
 #include "vector.h"
 #include "abstract_model.h"
+#include "p_node.h"
 
 #include <math.h>
@@ -604,35 +605,63 @@
 
 
-void OBBTreeNode::collideWith(BVTreeNode* treeNode)
-{
-  PRINTF(0)("collideWith");
+void OBBTreeNode::collideWith(BVTreeNode* treeNode, PNode* nodeA, PNode* nodeB)
+{
+  PRINTF(0)("collideWith\n");
   /* if the obb overlap, make subtests: check which node is realy overlaping  */
-  if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement))
+  if( this->overlapTest(this->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB))
   {
     /* check if left node overlaps */
     if( unlikely( this->nodeLeft != NULL))
-      if( this->overlapTest(this->nodeLeft->bvElement, ((OBBTreeNode*)treeNode)->bvElement))
-        this->nodeLeft->collideWith(((OBBTreeNode*)treeNode)->nodeLeft);
+      if( this->overlapTest(this->nodeLeft->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB))
+        this->nodeLeft->collideWith(((OBBTreeNode*)treeNode)->nodeLeft, nodeA, nodeB);
     /* check if right node overlaps */
     if( unlikely( this->nodeRight != NULL))
-      if(this->overlapTest(this->nodeRight->bvElement, ((OBBTreeNode*)treeNode)->bvElement))
-        this->nodeLeft->collideWith(((OBBTreeNode*)treeNode)->nodeRight);
-  }
-}
-
-
-
-bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB)
-{
+      if(this->overlapTest(this->nodeRight->bvElement, ((OBBTreeNode*)treeNode)->bvElement, nodeA, nodeB))
+        this->nodeLeft->collideWith(((OBBTreeNode*)treeNode)->nodeRight, nodeA, nodeB);
+  }
+}
+
+
+
+bool OBBTreeNode::overlapTest(OBB* boxA, OBB* boxB, PNode* nodeA, PNode* nodeB)
+{
+  
+  
   /* first check all axis */
-  float r = 0.0f;
-  Vector l = boxA->axis[0];
-  for(int i = 0; i < 3; ++i)
-  {
-    r += boxA->halfLength[i] * boxA->axis[i].dot(l);
-  }
-
-  printf("r = %f\n", r);
-  /* now check all orthogonals from the axis */
+  Vector t = nodeA->getAbsCoor() + *boxA->center - ( nodeB->getAbsCoor() + *boxB->center);
+  float rA = 0.0f;
+  float rB = 0.0f;
+  Vector l;
+
+  for(int j = 0; j < 3; ++j)
+    {
+      rA = 0.0f;
+      rB = 0.0f;
+      l = boxA->axis[j];
+
+      for(int i = 0; i < 3; ++i)
+	{
+	  rA += fabs(boxA->halfLength[i] * boxA->axis[i].dot(l));
+	}
+  
+      for(int i = 0; i < 3; ++i)
+	{
+	  rB += fabs(boxB->halfLength[i] * boxB->axis[i].dot(l));
+	}
+  
+      PRINTF(0)("s = %f, rA+rB = %f\n", fabs(t.dot(l)), rA+rB);
+
+      if( (rA + rB) < fabs(t.dot(l)))
+	PRINTF(0)(" - The Boxes are disjoint!\n");
+      else
+	PRINTF(0)(" - The Boxes are not disjoint\n");
+  
+      PRINTF(0)("rA = %f, rB = %f\n", rA, rB);
+
+
+      /* now check all orthogonals from the axis */
+
+    }
+  return false;
 }
 
Index: orxonox/trunk/src/lib/collision_detection/obb_tree_node.h
===================================================================
--- orxonox/trunk/src/lib/collision_detection/obb_tree_node.h	(revision 4699)
+++ orxonox/trunk/src/lib/collision_detection/obb_tree_node.h	(revision 4700)
@@ -17,4 +17,5 @@
 class OBBTree;
 class Plane;
+class PNode;
 //struct sVec3D;
 
@@ -33,5 +34,5 @@
     inline void setTreeRef(OBBTree* tree) { this->obbTree = tree;}
 
-    virtual void collideWith(BVTreeNode* treeNode);
+    virtual void collideWith(BVTreeNode* treeNode, PNode* nodeA, PNode* nodeB);
 
     virtual void drawBV(int depth, int drawMode) const;
@@ -45,5 +46,5 @@
     void forkBox(OBB* box);
 
-    bool overlapTest(OBB* boxA, OBB* boxB);
+    bool overlapTest(OBB* boxA, OBB* boxB, PNode* nodeA, PNode* nodeB);
 
   protected:
Index: orxonox/trunk/src/world_entities/world_entity.cc
===================================================================
--- orxonox/trunk/src/world_entities/world_entity.cc	(revision 4699)
+++ orxonox/trunk/src/world_entities/world_entity.cc	(revision 4700)
@@ -130,5 +130,5 @@
 void WorldEntity::collideWith(WorldEntity* entity)
 {
-  this->obbTree->collideWith(entity->obbTree);
+  this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);
 }
 
