pathfinding rework for now

This commit is contained in:
2025-06-13 00:06:51 +10:00
parent 400415f8a5
commit 6f4f465e37
817 changed files with 5533 additions and 3146 deletions

View File

@ -230,12 +230,13 @@ func find_path() -> bool:
func make_grid() -> void:
for x: int in grid_size.x:
for y: int in grid_size.y:
var point_position: Vector3 = Vector3((x - floori(grid_size.x / 2.0)) * point_gap, 0.5, (y - floori(grid_size.y / 2.0)) * point_gap)
var point_position: Vector3 = Vector3((x - floori(grid_size.x / 2.0)) * point_gap, 0, (y - floori(grid_size.y / 2.0)) * point_gap)
point_position += global_position
astar.add_point(int(x * grid_size.y + y), point_position)
var frame: Node3D = tower_frame_scene.instantiate()
frame.position = point_position
tower_frames.append(frame)
add_child(frame)
frame.global_position = point_position
for x: int in grid_size.x:
for y: int in grid_size.y: