Again seems a rather odd way of deriving the 2D height-map from the vertices.Assuming the model is a one-dimensional array of the same width-height size as the height-map then surely this is simpler:1 2 3 4 5 6 7 8 int idx = 0; for (int x=0; x<width; x++) { for (int z=0; z<height; z++) { &nbs