Exemplo n.º 1
0
  public void update(float tpf) {
    if (!playing) {
      return;
    }
    if (currentStep + 2 >= points.size()) {
      stop();
      return;
    }

    if (time > stepLength) {
      currentStep++;
      computeLength();
      time = 0;
    }

    Point p = interpolate(time / stepLength);
    app.getCamera().setLocation(p.position);
    app.getCamera().setRotation(p.rotation);
    time += tpf * p.speed * TerrainHeighmapCreator.TERRAIN_SCALE;
  }