feat: carve Jajce river into terrain

This commit is contained in:
Rijad Zuzo
2026-07-17 01:05:09 +02:00
parent 5356c34fd7
commit 145b90eb97
25 changed files with 603 additions and 74 deletions
+27 -1
View File
@@ -1,5 +1,7 @@
extends SceneTree
const JajceWatercourse := preload("res://world/jajce/JajceWatercourse.gd")
var failures: Array[String] = []
@@ -213,7 +215,7 @@ func _run() -> void:
"Waterfall mist particles should have visible billboard geometry"
)
_check(
waterfall_mist.position.distance_to(Vector3(25.0, 2.05, -24.0)) < 0.01,
waterfall_mist.position.distance_to(Vector3(25.0, 0.65, -21.5)) < 0.01,
"Waterfall mist should stay at the waterfall base instead of obscuring the village"
)
_check(world.has_node("WaterRoot/RiverSurface"), "WaterRoot should include a river surface")
@@ -222,10 +224,34 @@ func _run() -> void:
river_ribbon.mesh is ArrayMesh,
"River should build a lightweight ribbon from the current Terrain3D surface"
)
var upper_river_ribbon := (
world.get_node("WaterRoot/RiverSurface/UpperRiverRibbon") as MeshInstance3D
)
_check(
upper_river_ribbon.mesh is ArrayMesh,
"Waterfall shelf should expose a terrain-following upper stream"
)
_check(
world.has_node("WaterRoot/RiverSurface/PlungePool"),
"River should widen into a readable plunge pool beneath the waterfall"
)
var plunge_pool := world.get_node("WaterRoot/RiverSurface/PlungePool") as MeshInstance3D
var expected_pool_height: float = terrain.data.get_height(
Vector3(JajceWatercourse.PLUNGE_POOL_CENTER.x, 0.0, JajceWatercourse.PLUNGE_POOL_CENTER.y)
)
_check(
(
absf(
(
plunge_pool.global_position.y
- expected_pool_height
- JajceWatercourse.WATER_SURFACE_OFFSET
)
)
< 0.03
),
"Plunge-pool water should follow the carved basin height"
)
var environment: Environment = (
(world.get_node("WorldEnvironment") as WorldEnvironment).environment
)