Index: /trunk/src/lib/coord/p_node.cc
===================================================================
--- /trunk/src/lib/coord/p_node.cc	(revision 5418)
+++ /trunk/src/lib/coord/p_node.cc	(revision 5419)
@@ -11,5 +11,5 @@
    ### File Specific:
    main-programmer: Patrick Boenzli
-   co-programmer:
+   co-programmer: Benjamin Grauer
 */
 
@@ -630,8 +630,9 @@
       if (unlikely(this->toDirection != NULL))
       {
-        Quaternion rotQuat = Quaternion::quatSlerp(Quaternion(), (*this->toDirection / this->relDirection), fabsf(dt)*this->bias);
-        if (likely(rotQuat.getSpacialAxisAngle() > PNODE_ITERATION_DELTA))
+        Quaternion rotQuat = Quaternion::quatSlerp(this->relDirection,*this->toDirection, fabsf(dt)*this->bias);
+        if (this->relDirection.distance(rotQuat) >PNODE_ITERATION_DELTA)
         {
-          this->shiftDir(rotQuat);
+          this->relDirection = rotQuat;
+          this->bRelDirChanged;
         }
         else
Index: /trunk/src/lib/graphics/text_engine/text.cc
===================================================================
--- /trunk/src/lib/graphics/text_engine/text.cc	(revision 5418)
+++ /trunk/src/lib/graphics/text_engine/text.cc	(revision 5419)
@@ -251,17 +251,22 @@
         {
           glBegin(GL_QUADS);
+
           glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[2]);
           glVertex2d(posX, - tmpGlyph->bearingY * this->size);
+
           glTexCoord2f(tmpGlyph->texCoord[0], tmpGlyph->texCoord[3]);
           glVertex2d(posX, (tmpGlyph->height - tmpGlyph->bearingY)*this->size);
+
           glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[3]);
           glVertex2d(posX+tmpGlyph->width*this->size, (tmpGlyph->height - tmpGlyph->bearingY)*this->size);
+
           glTexCoord2f(tmpGlyph->texCoord[1], tmpGlyph->texCoord[2]);
           glVertex2d(posX+tmpGlyph->width*this->size, - tmpGlyph->bearingY*this->size);
+
           glEnd();
           glEndList();
-          posX += tmpGlyph->width*this->size;
+          posX += tmpGlyph->advance * this->size;
         }
-        tmpText++;
+        ++tmpText;
       }
     }
Index: /trunk/src/lib/math/vector.h
===================================================================
--- /trunk/src/lib/math/vector.h	(revision 5418)
+++ /trunk/src/lib/math/vector.h	(revision 5419)
@@ -157,4 +157,8 @@
   /** @returns the inverted Quaterntion of this */
   inline Quaternion inverse () const { return conjugate() / (w*w + v.x*v.x + v.y*v.y + v.z*v.z); };
+  /** @returns the dot Product of a Quaternion */
+  inline float dot (const Quaternion& q) const { return v.x*q.v.x + v.y*q.v.y + v.z*q.v.z + w*q.w; };
+  /** @retuns the Distance between two Quaternions */
+  inline float distance(const Quaternion& q) const { return 2*acos(fabsf(this->dot(q))); };
   /** @param v: the Vector  @return a new Vector representing v rotated by the Quaternion */
   inline Vector apply (const Vector& v) const { return (*this * Quaternion(v, 0) * conjugate()).v; };
Index: /trunk/src/world_entities/environment.cc
===================================================================
--- /trunk/src/world_entities/environment.cc	(revision 5418)
+++ /trunk/src/world_entities/environment.cc	(revision 5419)
@@ -38,6 +38,6 @@
   this->loadModel("models/ships/bolido.obj");
 
-  if(this->obbTree == NULL)
-    this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
+/*  if(this->obbTree == NULL)
+    this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());*/
 }
 
Index: /trunk/src/world_entities/test_entity.cc
===================================================================
--- /trunk/src/world_entities/test_entity.cc	(revision 5418)
+++ /trunk/src/world_entities/test_entity.cc	(revision 5419)
@@ -37,5 +37,5 @@
 //   this->md2Model = new MD2Model("models/tris.md2", "models/tris.pcx");
 // this->md2Model = new MD2Model("models/goblin.md2", "maps/goblin.bmp");
-  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
+//  this->obbTree = new OBBTree(4, (sVec3D*)this->md2Model->data->pVertices, this->md2Model->data->numVertices);
 
   this->md2Model->setAnim(RUN);
Index: /trunk/src/world_entities/world_entity.cc
===================================================================
--- /trunk/src/world_entities/world_entity.cc	(revision 5418)
+++ /trunk/src/world_entities/world_entity.cc	(revision 5419)
@@ -98,19 +98,19 @@
 bool WorldEntity::buildObbTree(unsigned int depth)
 {
-  if (this->obbTree)
-    delete this->obbTree;
-
-  if (this->model)
-  {
-    PRINTF(4)("creating obb tree\n");
-    this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
-    return true;
-  }
-  else
-  {
-    PRINTF(2)("could not create obb-tree, because no model was loaded yet\n");
-    this->obbTree = NULL;
-    return false;
-  }
+//   if (this->obbTree)
+//     delete this->obbTree;
+//
+//   if (this->model)
+//   {
+//     PRINTF(4)("creating obb tree\n");
+//     this->obbTree = new OBBTree(depth, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
+//     return true;
+//   }
+//   else
+//   {
+//     PRINTF(2)("could not create obb-tree, because no model was loaded yet\n");
+//     this->obbTree = NULL;
+//     return false;
+//  }
 }
 
