Implemented A* pathfinding. Adjusted movement node accordingly.

This commit is contained in:
=
2026-04-29 17:05:29 +02:00
parent 21a1eb2085
commit 253c7d9f89
6 changed files with 200 additions and 26 deletions
+2 -2
View File
@@ -198,9 +198,9 @@ public partial class Layer : Node3D
? new HashSet<string> { currentTile.collapsedMesh }
: new HashSet<string>(currentTile.tileMeshes.Keys);
for (int i = 0; i < dirs.Length; i++)
for (int i = 0; i < offsets2D.Length; i++)
{
Vector2I newPos = currentPos + offsets[i];
Vector2I newPos = currentPos + offsets2D[i];
if (!InBounds(newPos, layerSize)) continue;
Tile neighborTile = tiles[newPos.X, newPos.Y];