Error in Pathfinding

Hello, i’am trying to use the pathfinding.min.js used in last line defence, i have adapted my code and the player should use the path finding to move on the map, but i have this error [pathfinding.min.js:1]: TypeError: this.nodes[e] is undefined.
Can anyone help? https://playcanvas.com/editor/scene/397361

The issue is when I click on Durmaul it’s calling the pathFinder.findPath function from the getPath function in map.js and passing the arguments:

fx = 4
fy = -1

So that means the pathfinder is looking for position [-1][4] in your grid (of nodes), and obviously negative numbers do not work with arrays so it is saying that the [-1] row is undefined

:grin: of course if i don’t set the player initial position :stuck_out_tongue: