extends Area enum LOD {DISTANCE,MID,CLOSE} var lod = -1 onready var lod_distance = $"gen_tree/lod_distance" onready var lod_mid = $"gen_tree/lod_mid" onready var lod_close = $"gen_tree/lod_close" onready var _collision_enabled = lod_close.collision_layer func _ready(): lod_update() $"Coords".text = str(ChunkLoader.v2_coords(self.transform.origin)) func lod_update(): match lod: LOD.CLOSE: lod_distance.visible = false lod_mid.visible = true lod_close.collision_layer = _collision_enabled LOD.MID: lod_distance.visible = false lod_mid.visible = true lod_close.collision_layer = 0 LOD.DISTANCE: lod_distance.visible = true lod_mid.visible = false lod_close.collision_layer = 0 _: lod_distance.visible = true lod_mid.visible = false lod_close.collision_layer = 0