Making islands flat for now.

WorldChunkRefactoring
Martin Felis 2023-06-11 20:05:10 +02:00
parent eaf2d4824c
commit fdddc7d2ef
1 changed files with 6 additions and 2 deletions

View File

@ -199,13 +199,17 @@ public class TileWorld : Spatial
Vector2 textureCoord = OffsetToTextureCoord(offsetCoord);
float heightmapHeight = Heightmap.GetPixel((int)textureCoord.x, (int)(textureCoord.y)).r * HeightScale;
float heightmapHeight = Heightmap.GetPixel((int)textureCoord.x, (int)(textureCoord.y)).r;
if (heightmapHeight > 0.5)
{
heightmapHeight = 0.6f;
}
// heightmapHeight = Mathf.Floor(heightmapHeight);
// heightmapHeight = heightmapHeight * 10)
// heightmapHeight = Mathf.Clamp(heightmapHeight, -1f, 5);
return heightmapHeight;
return heightmapHeight * HeightScale;
}