From 32bf9d2024362d45dc351c8f1d0b3b301caf1131 Mon Sep 17 00:00:00 2001 From: dusoleil <howcansocksbereal@gmail.com> Date: Sun, 18 Sep 2022 19:38:35 -0400 Subject: Organize World Gen Stuff --- world/obstacles/Rock.gd | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 world/obstacles/Rock.gd (limited to 'world/obstacles/Rock.gd') diff --git a/world/obstacles/Rock.gd b/world/obstacles/Rock.gd new file mode 100644 index 0000000..577e626 --- /dev/null +++ b/world/obstacles/Rock.gd @@ -0,0 +1,18 @@ +extends StaticBody + +onready var collision_enabled = self.collision_layer + +func lod_distance(): + $"MeshInstance".visible = false + $"MeshInstance2".visible = true + self.collision_layer = 0 + +func lod_mid(): + $"MeshInstance".visible = true + $"MeshInstance2".visible = false + self.collision_layer = 0 + +func lod_close(): + $"MeshInstance".visible = true + $"MeshInstance2".visible = false + self.collision_layer = collision_enabled -- cgit v1.2.3