From 67578f4197586e566ee9f551692170631014ed47 Mon Sep 17 00:00:00 2001 From: dusk Date: Wed, 4 Mar 2026 16:47:23 +0100 Subject: [PATCH] feat: Add more building collisions --- chunk.gd | 2 -- chunk.tscn | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/chunk.gd b/chunk.gd index 9a58e3c..0f69b74 100644 --- a/chunk.gd +++ b/chunk.gd @@ -6,8 +6,6 @@ var exits: Array = [false, false, false, false] const STREET_WIDTH: float = 40 - - func _ready() -> void: $Mesh.mesh.size.x = Global.chunk_size $Mesh.mesh.size.y = Global.chunk_size diff --git a/chunk.tscn b/chunk.tscn index 764c00f..a1b513e 100644 --- a/chunk.tscn +++ b/chunk.tscn @@ -33,6 +33,18 @@ size = Vector3(55, 50, 55) [sub_resource type="BoxMesh" id="BoxMesh_eat54"] size = Vector3(55, 50, 55) +[sub_resource type="BoxShape3D" id="BoxShape3D_a0kup"] +size = Vector3(55, 50, 40) + +[sub_resource type="BoxShape3D" id="BoxShape3D_7yqgf"] +size = Vector3(55, 50, 40) + +[sub_resource type="BoxShape3D" id="BoxShape3D_381vs"] +size = Vector3(40, 50, 55) + +[sub_resource type="BoxShape3D" id="BoxShape3D_eat54"] +size = Vector3(40, 50, 55) + [node name="Chunk" type="Node3D" unique_id=1195945545] script = ExtResource("1_kdh3y") @@ -105,3 +117,27 @@ shape = SubResource("BoxShape3D_kdh3y") [node name="MeshInstance3D" type="MeshInstance3D" parent="BuildingAreas/B_area_4/CollisionShape3D" unique_id=1227151220] mesh = SubResource("BoxMesh_eat54") + +[node name="B_area_N" type="StaticBody3D" parent="BuildingAreas" unique_id=164651542] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 47.5, 0, 0) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="BuildingAreas/B_area_N" unique_id=2080946797] +shape = SubResource("BoxShape3D_a0kup") + +[node name="B_area_S" type="StaticBody3D" parent="BuildingAreas" unique_id=1412614477] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -47.5, 0, 0) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="BuildingAreas/B_area_S" unique_id=1045867626] +shape = SubResource("BoxShape3D_7yqgf") + +[node name="B_area_E" type="StaticBody3D" parent="BuildingAreas" unique_id=1192841263] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 47.5) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="BuildingAreas/B_area_E" unique_id=685649647] +shape = SubResource("BoxShape3D_381vs") + +[node name="B_area_W" type="StaticBody3D" parent="BuildingAreas" unique_id=1360962540] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -47.5) + +[node name="CollisionShape3D" type="CollisionShape3D" parent="BuildingAreas/B_area_W" unique_id=2008861829] +shape = SubResource("BoxShape3D_eat54")