Support Forum

2d pathfinding not giving correct ZCoordinateInGrid value

Hello and thank you for your time. This tool is awesome.

I am using the AStarpath.cs (once!) in my project which is a 2D grid (think dune 2 grid map)
and on seeker.StartPath I feed it the startpos of (12,8,0) and endpos of (5,8,0). I catch later the OnPathComplete event but something is wrong as ZCoordinateInGrid is always 127 for each node in path which is the grid size.
I think the return of ZCoordinateInGrid should be 8 as is the y coordinate (we just move in x in this example). Moreover changing values of startpos and endpos to the Z coordinate of vector has no effect.
Whats more there is nowhere a YCoordinateInGrid property which could contain the value.


Sorry for the late reply, I have been away for some time.
Which version of the package are you using?

Do you think you could post the exact code you are using?