level pt1

This commit is contained in:
Michael Campbell 2026-03-02 23:23:21 -05:00
parent e14289807b
commit ebdb9c7074
13 changed files with 5138 additions and 1 deletions

20
levels/floor_gen.gd Normal file
View file

@ -0,0 +1,20 @@
@tool
extends Path3D
@export_tool_button("Generate Terrain")
var gen_button := _generate
func _ready() -> void:
curve_changed.connect(_generate)
func _generate() -> void:
var points = PackedVector2Array()
# we assume there's no curves.
# if there are curves, we gotta start using the baked points.
if curve:
for idx in curve.point_count:
var p := curve.sample(idx, 0)
points.push_back(Vector2(p.x, p.z))
%Floor.polygon = points