Beispiel #1
0
 public void SetHeight(Texture2D heightMap, float scale)
 {
     Color[] sub_map = heightMap.GetPixels((int)pos.x, (int)pos.y, chunkSize, chunkSize);
     mesh.SetHeights(sub_map, scale);
     mesh.Triangulate();
     vertices.SetData(mesh.vertices);
     buffer.SetData(mesh.triangles);
 }