6c11dc5dd6
- Add 3 Terrain3D texture assets (limestone, valley grass, warm soil) - Sculpt initial Terrain3D heightmap with ridge, valley, waterfall drop - Replace plain water with emissive-tinged material - Add foam mesh, mist spheres, and procedural sky with valley fog - Add 10 StylizedTree instances around village perimeter - Enable directional light shadows with extended cascade range - Add tree height snapping to terrain surface - Add refined scaffold tests for material count, terrain height, foliage, sky, fog - Add terrain texture PNGs and StylizedTree.tscn scene - Add generate_jajce_terrain.gd tool
16 lines
504 B
GDScript
16 lines
504 B
GDScript
extends Node3D
|
|
|
|
@onready var terrain: Terrain3D = $TerrainRoot/Terrain3D
|
|
|
|
func _ready() -> void:
|
|
call_deferred("_initialize_world_presentation")
|
|
|
|
func _initialize_world_presentation() -> void:
|
|
var active_camera := get_viewport().get_camera_3d()
|
|
if active_camera != null:
|
|
terrain.set_camera(active_camera)
|
|
for tree in $FoliageRoot.get_children():
|
|
var terrain_height: float = terrain.data.get_height(tree.global_position)
|
|
if not is_nan(terrain_height):
|
|
tree.global_position.y = terrain_height
|