Implemented A* pathfinding. Adjusted movement node accordingly.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user