Hello,
I am working on a custom tile-based terrain editor
I am trying to achieve something similar to this:
What I currently have is this:
In my version you can clearly see each tile because of the lighting. how do i solve this ? does it have to do with lightmaps or normals?
Currently, after I raise the verticies of a tile, I do the following:
Mesh.Clear();
TopLeft = v3helper.ClampVector3ToMaxHeight(TopLeft, maxTileHeight);
TopRight = v3helper.ClampVector3ToMaxHeight(TopRight, maxTileHeight);
BotLeft = v3helper.ClampVector3ToMaxHeight(BotLeft, maxTileHeight);
BotRight = v3helper.ClampVector3ToMaxHeight(BotRight, maxTileHeight);
Mesh.vertices = new Vector3[]
{
TopLeft,
TopRight,
BotLeft,
BotRight
};
Mesh.uv = new Vector2[]
{
new Vector2 (0,1),
new Vector2 (1,1),
new Vector2 (0,0),
new Vector2 (1,0)
};
Mesh.triangles = new int[] { 0, 1, 2, 1, 3, 2 };
Mesh.RecalculateNormals();
Mesh.RecalculateBounds();
MC.sharedMesh = Mesh;
Thanks!