trying to understand the Car sample

Started by athanazio, November 21, 2006, 04:39:59 PM

Previous topic - Next topic

athanazio

I'm very happy with the engine ! but I got stuck at one piece of code at the Car sample ...

     
     /**
      * The terrain isn't located where we want it to, so we take
      * care of this here:
      */
     SimpleVector pos=terrain.getCenter();
     pos.scalarMul(-1f);
     terrain.translate(pos);
     terrain.rotateX((float)-Math.PI/2f);
     terrain.translateMesh();
     terrain.rotateMesh();
     terrain.setTranslationMatrix(new Matrix());
     terrain.setRotationMatrix(new Matrix());


I just dont understand this ... :D any help would be great !