-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Steps to reproduce
float[,] tilesmap = new float[4, 4];
for (int i = 0; i < 4; i++)
{
for (int ii = 0; ii < 4; ii++)
{
tilesmap[i, ii] = 3.0f; // <= price is 3
}
}
NesScripts.Controls.PathFind.Grid grid = new NesScripts.Controls.PathFind.Grid(tilesmap);
Point _from = new Point(0, 0);
Point _to = new Point(3, 3);
List<Point> path = Pathfinding.FindPath(grid, _from, _to, Pathfinding.DistanceType.Manhattan);
foreach (Point p in path)
{
Debug.Log(p.x + " , " + p.y);
}
// path: (1,0) (1,1) (2,1) (2,2) (3,2) (3,3)Expected result
According to my understanding, path should be:
(1,0) (1,0) (1,0) (1,1) (1,1) (1,1) (2,1) (2,1) (2,1) (2,2) (2,2) (2,2) (3,2) (3,2) (3,2) (3,3) (3,3) (3,3)
Metadata
Metadata
Assignees
Labels
No labels