From 599c8dd969ca3eec1767eaf3585ae9a32d23fa57 Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Sun, 22 Sep 2024 18:19:51 +0100 Subject: bsp_level_generator: Generate level geometry manually Don't use CSG geometry, this makes it easier to generate a collision mesh, and in the future would make it easier to have player created levels. Level generation is much faster now as well. --- prefabs/bsp_level_generator.tscn | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'prefabs') diff --git a/prefabs/bsp_level_generator.tscn b/prefabs/bsp_level_generator.tscn index ea0cfd7..f9e05db 100644 --- a/prefabs/bsp_level_generator.tscn +++ b/prefabs/bsp_level_generator.tscn @@ -1,11 +1,22 @@ -[gd_scene load_steps=3 format=3 uid="uid://w7hxcvuvud"] +[gd_scene load_steps=4 format=3 uid="uid://w7hxcvuvud"] [ext_resource type="Script" path="res://scripts/bsp_level_generator.gd" id="1_6jn1x"] +[sub_resource type="ArrayMesh" id="ArrayMesh_xgab6"] + [sub_resource type="NavigationMesh" id="NavigationMesh_q1fo6"] +geometry_parsed_geometry_type = 1 +geometry_collision_mask = 4294967041 [node name="BspLevelGenerator" type="Node3D"] script = ExtResource("1_6jn1x") +[node name="MeshInstance3D" type="MeshInstance3D" parent="."] +mesh = SubResource("ArrayMesh_xgab6") + [node name="NavigationRegion3D" type="NavigationRegion3D" parent="."] navigation_mesh = SubResource("NavigationMesh_q1fo6") + +[node name="StaticBody3D" type="StaticBody3D" parent="NavigationRegion3D"] + +[node name="CollisionShape3D" type="CollisionShape3D" parent="NavigationRegion3D/StaticBody3D"] -- cgit