Closed mikkleini closed 4 years ago
Removed agent shape consideration from end point check. If agent is too large to get to the end which is at the edge of the grid then partial path is returned:
SquareW3 used in example:
You could keep backwards compatibility with GetPath
. Just add back GetPath
and make it return null unless it finds a path?
Also, what would happen if the agent is currently on top of a cell that is blocked? Is that what the "stuck" result is used for?
Great work, I've re-implemented this in v2, which is under construction :).
Solves #27
If path to the end point is not found then at least a path to closest point is returned. Introduced path finding result enumeration which explain the type of the path:
However, this broke the compatibility. There's no more "GetPath" function, instead there's "TryGetPath".
Looks like this:
@roy-t - please don't merge yet. I have some TODO's there. I'm mainly thinking about removing agent shape dependent end point boundary check. It might be better to return partial path to end point rather than returning EndOutsideBoundaries error and no path.