Index: /branches/playability/src/lib/graphics/importer/vertex_array_model.cc
===================================================================
--- /branches/playability/src/lib/graphics/importer/vertex_array_model.cc	(revision 10153)
+++ /branches/playability/src/lib/graphics/importer/vertex_array_model.cc	(revision 10154)
@@ -260,5 +260,5 @@
                             ((float)j - (float)resolutionY/2.0)/(float)resolutionY * sizeY);
           this->addNormal(0.0, 1, 0.0);
-          this->addTexCoor((float)i/(float)resolutionX, (float)j/(float)resolutionY);
+          this->addTexCoor((float)i/(float)(resolutionY-1), (float)j/(float)(resolutionX-1));
           this->addColor(1.0, 1.0, 1.0);
         }
Index: /branches/playability/src/world_entities/Makefile.am
===================================================================
--- /branches/playability/src/world_entities/Makefile.am	(revision 10153)
+++ /branches/playability/src/world_entities/Makefile.am	(revision 10154)
@@ -10,5 +10,5 @@
 				weapons/weapon.cc 		weapons/ammo_container.cc 		projectiles/projectile.cc \
 						extendable.cc 		power_ups/power_up.cc 		power_ups/param_power_up.cc \
-				power_ups/weapon_power_up.cc 				spawning_point.cc 						effects/explosion.cc 		effects/billboard.cc \
+				power_ups/weapon_power_up.cc 				spawning_point.cc 						effects/explosion.cc 		effects/billboard.cc 		effects/wobblegrid.cc\
 				effects/trail.cc				elements/glgui_energywidget.cc elements/glgui_energywidgetvertical.cc
 
@@ -18,5 +18,5 @@
 				weapons/weapon.h 		weapons/ammo_container.h 		projectiles/projectile.h \
 						power_ups/power_up.h 		power_ups/param_power_up.h 		power_ups/weapon_power_up.h \
-						spawning_point.h 						effects/explosion.h 		effects/billboard.h		effects/trail.h \
+						spawning_point.h 						effects/explosion.h 		effects/billboard.h		effects/trail.h  		effects/wobblegrid.h\
 										elements/glgui_energywidget.h elements/glgui_energywidgetvertical.h
 
Index: /branches/playability/src/world_entities/effects/wobblegrid.cc
===================================================================
--- /branches/playability/src/world_entities/effects/wobblegrid.cc	(revision 10154)
+++ /branches/playability/src/world_entities/effects/wobblegrid.cc	(revision 10154)
@@ -0,0 +1,233 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2006 orx
+
+   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, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: David Hasenfratz
+*/
+
+#include "wobblegrid.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "graphics_engine.h"
+#include "material.h"
+#include "glincl.h"
+#include "state.h"
+#include "grid.h"
+
+#include <assert.h>
+#include "debug.h"
+
+
+#include "class_id_DEPRECATED.h"
+ObjectListDefinition(Wobblegrid);
+CREATE_FACTORY(Wobblegrid);
+
+/**
+ * Wobble Grids are grids which "wobble"
+ * Wobbling is realized through fixed center and sin wave outwards
+ * For the beginning the grid will be a 5x5
+ */
+
+/**
+ * standart constructor
+ */
+Wobblegrid::Wobblegrid (const TiXmlElement* root)
+{
+  this->size  = 5;
+
+  this->init();
+
+  if( root)
+    this->loadParams(root);
+}
+
+Wobblegrid::Wobblegrid (int size, const TiXmlElement* root)
+{
+  this->size  = size;
+
+  this->init();
+
+  if( root)
+    this->loadParams(root);
+}
+
+
+/**
+ * destroys a Wobblegrid
+ */
+Wobblegrid::~Wobblegrid ()
+{
+  if (this->material)
+    delete this->material;
+}
+
+
+/**
+ * initializes the Wobblegrid
+ */
+void Wobblegrid::init()
+{
+  this->registerObject(this, Wobblegrid::_objectList);
+  this->setName("Wobblegrid");
+
+  this->toList(OM_COMMON);
+
+  this->material = new Material();
+  this->setAbsCoor(0, 0, 0);
+  //this->setVisibiliy(true);
+  
+  this->subdivision = 5;
+
+  this->grid  = new Grid( this->size, this->size, this->subdivision, this->subdivision);
+  for (int i = 0; i < 25; i++)
+    PRINTF(0)("Coordinate %i: %f,%f\n",i,this->grid->vertex(i).x,this->grid->vertex(i).z);
+  this->angularSpeed = M_PI; //180;
+}
+
+
+/**
+ *  load params
+ * @param root TiXmlElement object
+ */
+void Wobblegrid::loadParams(const TiXmlElement* root)
+{
+  /*LoadParam(root, "texture", this->material, Material, setDiffuseMap)
+      .describe("the texture-file to load onto the Wobblegrid");
+
+  LoadParam(root, "size", this, Wobblegrid, setSize)
+  .describe("the size of the Wobblegrid in Pixels");*/
+}
+
+
+
+/**
+ * sets the material to load
+ * @param textureFile The texture-file to load
+ */
+void Wobblegrid::setTexture(const std::string& textureFile)
+{
+  this->material->setDiffuseMap(textureFile);
+}
+
+
+/**
+ * ticks the Wobblegrid
+ * @param dt the time to ticks
+ */
+void Wobblegrid::tick(float dt)
+{
+  angle += dt * angularSpeed;
+  if (angle > 2 * M_PI)
+    angle -= 2 * M_PI;
+
+  //Vector vec;
+  float fac = 1.0 / (this->subdivision - 1);
+  for( int z=1; z < 4; z++)
+  {
+    for( int x=1; x < 4; x++)
+    {
+      //if(x==2 && z == 2)
+      //  continue;
+
+      Vector2D& vec = this->grid->texCoord(z*this->subdivision + x);
+      vec.y  = (x * fac + sgn(x-2)*sinf(angle)*fac/2.0);
+      vec.x  = (z * fac + sgn(z-2)*sinf(angle)*fac/2.0);
+    }
+  }
+  //this->grid->finalize();
+}
+
+
+/**
+ * draws the billboard
+ */
+void Wobblegrid::draw() const
+{
+  if( !this->isVisible())
+    return;
+
+  glPushAttrib(GL_ENABLE_BIT);
+  glDisable(GL_LIGHTING);
+  glDisable(GL_FOG);
+
+  glPushMatrix();
+
+  //glTranslatef(this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z);
+  //glTranslatef(0,0,0);
+  this->material->select();
+
+  const PNode* camera = State::getCameraNode();  //!< @todo MUST be different
+  Vector cameraPos = camera->getAbsCoor();
+  Vector cameraTargetPos = State::getCameraTargetNode()->getAbsCoor();
+  Vector view = cameraTargetPos - cameraPos;
+
+
+  Vector up = Vector(0, 1, 0);
+  up = camera->getAbsDir().apply(up);
+  Vector h = up.cross(view);
+  Vector v = h.cross(view);
+  h.normalize();
+  v.normalize();
+
+  float rangle  = acosf(v.dot(view)/view.len());
+
+  v *= size;
+  h *= size;
+
+//v += this->getAbsCoor();
+    //PRINTF(0)("sizeX: %f sizeZ: %f\n", sizeX, sizeZ);
+  /*int xone = 0;
+  int zone = 0;
+  
+  glBegin(GL_QUADS);
+
+  for( int z=0; z<4; z++)
+  {
+    for( int x=0; x<4; x++)
+    {
+      xone = x + 1;
+      zone = z + 1;
+      glTexCoord2f(x*.25f,z*.25f);
+      glVertex3f( this->getAbsCoor().x + this->grid[z][x].x*this->sizeX2 - h.x - v.x,
+                  this->getAbsCoor().y - h.y - v.y,
+                  this->getAbsCoor().z + this->grid[z][x].z*this->sizeZ2 - h.z - v.z);
+
+      glTexCoord2f(x*.25f,zone*.25f);
+      glVertex3f( this->getAbsCoor().x + this->grid[zone][x].x*this->sizeX2 - h.x - v.x,
+                  this->getAbsCoor().y - h.y - v.y,
+                  this->getAbsCoor().z + this->grid[zone][x].z*this->sizeZ2 - h.z - v.z);
+
+      glTexCoord2f(xone*.25f,zone*.25f);
+      glVertex3f( this->getAbsCoor().x + this->grid[zone][xone].x*this->sizeX2 - h.x - v.x,
+                  this->getAbsCoor().y - h.y - v.y,
+                  this->getAbsCoor().z + this->grid[zone][xone].z*this->sizeZ2 - h.z - v.z);
+
+      glTexCoord2f(xone*.25f,z*.25f);
+      glVertex3f( this->getAbsCoor().x + this->grid[z][xone].x*this->sizeX2 - h.x - v.x,
+                  this->getAbsCoor().y - h.y - v.y,
+                  this->getAbsCoor().z + this->grid[z][xone].z*this->sizeZ2 - h.z - v.z);
+    }
+  }
+  glEnd();*/
+  glTranslatef (this->getAbsCoor ().x,
+                  this->getAbsCoor ().y,
+                  this->getAbsCoor ().z);
+  //Vector tmpRot = this->getAbsDir().getSpacialAxis();
+  glRotatef (rangle, view.x, view.y, view.z );
+  //glRotatef(this->angle, 0.0, 0.0, 1.0);
+
+  this->grid->draw();
+
+  glPopMatrix();
+
+  glPopAttrib();
+}
Index: /branches/playability/src/world_entities/effects/wobblegrid.h
===================================================================
--- /branches/playability/src/world_entities/effects/wobblegrid.h	(revision 10154)
+++ /branches/playability/src/world_entities/effects/wobblegrid.h	(revision 10154)
@@ -0,0 +1,43 @@
+/*!
+ * @file wobblegrid.h
+ */
+
+#ifndef _WOBBLEGRID_H
+#define _WOBBLEGRID_H
+
+#include "world_entity.h"
+
+class Material;
+class TiXmlElement;
+class Grid;
+
+class Wobblegrid : public WorldEntity
+{
+  ObjectListDeclaration(Wobblegrid);
+  public:
+    Wobblegrid(int size, const TiXmlElement* root = NULL);
+    Wobblegrid( const TiXmlElement* root = NULL);
+    virtual ~Wobblegrid();
+
+    void init();
+    void loadParams(const TiXmlElement* root);
+
+    void setTexture(const std::string& textureFile);
+
+    inline float sgn(float x) { if(likely(x==0)) return 0.0f; else return x / fabsf(x);};
+    virtual void tick(float dt);
+    virtual void draw() const;
+
+  private:
+    Material*        material;
+    Grid*            grid;	//!< current projected positions transformed into billboard state
+
+    int subdivision;
+
+    int size;
+
+    float angle;
+    float angularSpeed;
+};
+
+#endif /* _WOBBLEGRID_H */
Index: /branches/playability/src/world_entities/space_ships/space_ship.cc
===================================================================
--- /branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10153)
+++ /branches/playability/src/world_entities/space_ships/space_ship.cc	(revision 10154)
@@ -37,4 +37,6 @@
 #include "particles/sprite_particles.h"
 #include "effects/trail.h"
+
+#include "effects/wobblegrid.h"
 
 #include "util/loading/factory.h"
@@ -370,4 +372,11 @@
 
   this->toList(OM_GROUP_00);
+
+  Wobblegrid* test  = new Wobblegrid(5);
+  test->setTexture("maps/fichte_ast6.tga");
+  
+  test->setAbsCoor( this->getAbsCoor() + Vector(0, 2, 0));
+  test->setParent( this);
+  
 }
 
