summaryrefslogtreecommitdiffstats
path: root/World.tscn
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-09-16 21:51:15 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-09-16 21:51:15 -0400
commit760fc610908ca5a5a1ebb46e1996801c08d800aa (patch)
tree7dfdcae4da7702a25113eaf605350e619104bb15 /World.tscn
parent32dca307fe89880f7f26b3e20d5ef3d2dabe821e (diff)
downloadgodot_wildjam_49-760fc610908ca5a5a1ebb46e1996801c08d800aa.tar.gz
godot_wildjam_49-760fc610908ca5a5a1ebb46e1996801c08d800aa.zip
Rewrite World code to load/deload Chunks in a circle around a traveler
Diffstat (limited to '')
-rw-r--r--World.tscn38
1 files changed, 38 insertions, 0 deletions
diff --git a/World.tscn b/World.tscn
new file mode 100644
index 0000000..67e4848
--- /dev/null
+++ b/World.tscn
@@ -0,0 +1,38 @@
+[gd_scene load_steps=5 format=2]
+
+[ext_resource path="res://World.gd" type="Script" id=1]
+[ext_resource path="res://Chunk.tscn" type="PackedScene" id=3]
+
+[sub_resource type="BoxShape" id=23]
+
+[sub_resource type="SphereShape" id=24]
+radius = 1000.0
+
+[node name="World" type="Spatial"]
+script = ExtResource( 1 )
+
+[node name="WorldGen" type="RigidBody" parent="."]
+collision_layer = 0
+collision_mask = 0
+can_sleep = false
+axis_lock_linear_y = true
+axis_lock_angular_x = true
+axis_lock_angular_y = true
+axis_lock_angular_z = true
+linear_damp = 0.5
+
+[node name="CollisionShape" type="CollisionShape" parent="WorldGen"]
+shape = SubResource( 23 )
+
+[node name="Chunk" parent="WorldGen" instance=ExtResource( 3 )]
+visible = false
+collision_layer = 0
+
+[node name="WorldGenCull" type="Area" parent="."]
+collision_layer = 0
+collision_mask = 32
+
+[node name="Radius" type="CollisionShape" parent="WorldGenCull"]
+shape = SubResource( 24 )
+
+[connection signal="area_exited" from="WorldGenCull" to="." method="_on_WorldGenCull_area_exited"]