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