Spaces:
Sleeping
Sleeping
Merge remote-tracking branch 'origin/main' into main
Browse files
godot.gd
CHANGED
@@ -108,3 +108,16 @@ func _run():
|
|
108 |
for room_name in data.keys():
|
109 |
if room_name != "corridor":
|
110 |
create_room(room_name + "Inset", data[room_name], csg_combiner, root, .1, 0.06, CSGPolygon3D.OPERATION_UNION)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
for room_name in data.keys():
|
109 |
if room_name != "corridor":
|
110 |
create_room(room_name + "Inset", data[room_name], csg_combiner, root, .1, 0.06, CSGPolygon3D.OPERATION_UNION)
|
111 |
+
|
112 |
+
# Set the size of the baseplate to match the expanded aabb
|
113 |
+
baseplate.size.x = aabb.size.x
|
114 |
+
baseplate.size.z = aabb.size.z
|
115 |
+
# You can adjust the height as per your requirement
|
116 |
+
baseplate.size.y = 0.1
|
117 |
+
|
118 |
+
# Position the baseplate at the center of the aabb
|
119 |
+
baseplate.transform.origin = aabb.position + aabb.size / 2 - Vector3(0, baseplate.size.y / 2, 0)
|
120 |
+
|
121 |
+
# Add the baseplate to the root node
|
122 |
+
csg_combiner.add_child(baseplate)
|
123 |
+
baseplate.owner = root
|