Making islands flat for now.
parent
eaf2d4824c
commit
fdddc7d2ef
|
@ -199,13 +199,17 @@ public class TileWorld : Spatial
|
||||||
|
|
||||||
Vector2 textureCoord = OffsetToTextureCoord(offsetCoord);
|
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 = Mathf.Floor(heightmapHeight);
|
||||||
// heightmapHeight = heightmapHeight * 10)
|
// heightmapHeight = heightmapHeight * 10)
|
||||||
// heightmapHeight = Mathf.Clamp(heightmapHeight, -1f, 5);
|
// heightmapHeight = Mathf.Clamp(heightmapHeight, -1f, 5);
|
||||||
|
|
||||||
return heightmapHeight;
|
return heightmapHeight * HeightScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue