Hello, thanks for this great library.
I am making a 2D tower defense game. I have a grid graph where units of 1 grid size works well. However, I also have units of 3x3 size that should not be able to go through a 1 square opening. I have tried the traversalProvider approach:
Vector3 closest_pos = (Vector3)AstarPath.active.GetNearest(target.transform.position, NNConstraint.Default).position; ABPath ab_path = ABPath.Construct(transform.position, closest_pos, OnTraversalPathComplete); ab_path.calculatePartial = true; ab_path.traversalProvider = GridShapeTraversalProvider.SquareShape(grid_size); seeker.StartPath(ab_path);
However, if there is no path to the final destination, the 3x3 units will not calculate a partial path.
Basically, I need large units to be able to handle cases were
- there is a 3 unit wide path to destination,
- There are no 3 unit wide paths to destination, and
- There is no path of any width
With code above only #1 works.