Now About Social Code
summaryrefslogtreecommitdiff
path: root/scripts/bsp_level_generator.gd
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bsp_level_generator.gd')
-rw-r--r--scripts/bsp_level_generator.gd5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/bsp_level_generator.gd b/scripts/bsp_level_generator.gd
index 2243481..ac095ef 100644
--- a/scripts/bsp_level_generator.gd
+++ b/scripts/bsp_level_generator.gd
@@ -7,7 +7,7 @@ extends Node3D
@export_category("Geometry Generator")
## Geometry generation config
-@export var wall_thickness: float = 1.25
+@export var wall_thickness: float = 1.3
@onready var mesh: MeshInstance3D = $MeshInstance3D
@@ -140,6 +140,7 @@ func generate_geo(grid: Array[Tile], array: Array):
generate_plane(array, Vector3(x, 2, y+1), [Vector3(1, 0, 0), Vector3(0, -2, 0)], Vector3.BACK)
generate_plane(array, Vector3(x+1, 2, y+1), [Vector3(0, 0, -1), Vector3(0, -2, 0)], Vector3.LEFT)
generate_plane(array, Vector3(x+1, 2, y), [Vector3(-1, 0, 0), Vector3(0, -2, 0)], Vector3.FORWARD)
+ pass
func _ready() -> void:
var starting_axis = randi_range(0, 1)
@@ -164,3 +165,5 @@ func _ready() -> void:
var tri_mesh = mesh.mesh.create_trimesh_shape()
$NavigationRegion3D/StaticBody3D/CollisionShape3D.shape = tri_mesh
$NavigationRegion3D.bake_navigation_mesh()
+
+ #ResourceSaver.save(mesh.mesh, "res://map.tres", ResourceSaver.FLAG_COMPRESS)