private void doMovement() {

      /**
       * The first part handles the "physics", i.e. it allows the player to fall down.
       */

      SimpleVector camPos=camera.getPosition();
      camPos.add(new SimpleVector(0, PLAYER_HEIGHT/2f, 0));
      SimpleVector dir=new SimpleVector(0, GRAVITY, 0);
      dir=theWorld.checkCollisionEllipsoid(camPos, dir, ELLIPSOID_RADIUS, 1);
      camPos.add(new SimpleVector(0, -PLAYER_HEIGHT/2f, 0));
      dir.x=0;
      dir.z=0;
      camPos.add(dir);
      camera.setPosition(camPos);

      /**
       * The "falling" part of the player is now finished. Now we care for the horizontal movement.
       * Nothing special here and no problems either. One thing worth mentioning is, that the player is
       * always moving in the same plane regardless of where he's looking. playerDirection takes
       * care of this.
       */

      // forward and back may change during excution (threaded!), so we have to ensure to
      // reset the camera only if has been changed before.
      boolean cameraChanged=false;

      if (forward) {
         camera.moveCamera(new SimpleVector(0,1,0), PLAYER_HEIGHT/2f);
         cameraChanged=true;
         tempVector=playerDirection.getZAxis();
         theWorld.checkCameraCollisionEllipsoid(tempVector, ELLIPSOID_RADIUS, MOVE_SPEED, 5);
      }
      if (back) {
         if (!cameraChanged) {
            camera.moveCamera(new SimpleVector(0,1,0), PLAYER_HEIGHT/2f);
            cameraChanged=true;
         }
         tempVector=playerDirection.getZAxis();
         tempVector.scalarMul(-1f);
         theWorld.checkCameraCollisionEllipsoid(tempVector, ELLIPSOID_RADIUS, MOVE_SPEED, 5);
      }

      if (left) {
         camera.rotateAxis(camera.getBack().getYAxis(), -TURN_SPEED);
         playerDirection.rotateY(-TURN_SPEED);
      }
      if (right) {
         camera.rotateAxis(camera.getBack().getYAxis(), TURN_SPEED);
         playerDirection.rotateY(TURN_SPEED);
      }

      if (up) {
         camera.rotateX(TURN_SPEED);
      }
      if (down) {
         camera.rotateX(-TURN_SPEED);
      }

      if (cameraChanged) {
         camera.moveCamera(new SimpleVector(0, -1, 0), PLAYER_HEIGHT/2f);
      }
   }