summaryrefslogtreecommitdiffstats
path: root/Rock.gd
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-09-18 08:32:29 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-09-18 08:32:29 -0400
commitffc92ed12c6e680776d355ff9fcef70e5e28d7c8 (patch)
tree11060de6eee066442dcbca1babcf0f69dac525b2 /Rock.gd
parent3dfcc3706f5dcb4b8150e027a02d0eb84c929b26 (diff)
downloadgame_jam49-ffc92ed12c6e680776d355ff9fcef70e5e28d7c8.tar.gz
game_jam49-ffc92ed12c6e680776d355ff9fcef70e5e28d7c8.zip
Prototype levels of detail per chunk
Diffstat (limited to 'Rock.gd')
-rw-r--r--Rock.gd18
1 files changed, 18 insertions, 0 deletions
diff --git a/Rock.gd b/Rock.gd
new file mode 100644
index 0000000..577e626
--- /dev/null
+++ b/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