From 977d150a4656dddb54ece742cfa8348a67ed8196 Mon Sep 17 00:00:00 2001 From: dingo Date: Mon, 16 Mar 2026 14:38:57 -0400 Subject: [PATCH] Visual: randomise tile column depth for organic terrain feel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Each placeholder tile box is assigned a random visual height between 0.8 and 1.0. The mesh is shifted downward so the TOP surface stays fixed at world Y=0.5 — collision shapes, unit y_offsets, and highlight positions are all unchanged. The variation shows as more or less tile-side visible from the camera angle, giving the grid an uneven, terrain-like appearance. 3D tile models (when loaded) replace the placeholder mesh and are unaffected. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Client/origin-client/scenes/game/game_screen.gd | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index 00fc98a..7bc73b0 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -458,9 +458,14 @@ func _add_tile(x: int, y: int, affinity: String) -> void: body.add_child(shape) # Placeholder: affinity-coloured flat box, swapped out if a 3D model loads. + # Visual height varies per tile (0.8–1.0) for organic terrain feel. + # The mesh is shifted downward so the TOP surface always stays at Y=0.5 in + # world space — collision shape, unit positions, and highlights are unaffected. + var vis_h : float = randf_range(0.8, 1.0) var mi := MeshInstance3D.new() var bm := BoxMesh.new() - bm.size = Vector3(0.98, 0.5, 0.98) + bm.size = Vector3(0.98, vis_h, 0.98) + mi.position = Vector3(0, (0.5 - vis_h) * 0.5, 0) # shift down to keep top at body-local +0.25 mi.mesh = bm var mat := StandardMaterial3D.new() mat.albedo_color = AFFINITY_COLORS.get(affinity, Color(0.2, 0.2, 0.2))