easystarjs icon indicating copy to clipboard operation
easystarjs copied to clipboard

Fix corner cutting of `pointsToAvoid`

Open robbeman opened this issue 3 years ago • 2 comments
trafficstars

When corner cutting is enabled it was still possible to cut corners of points to avoid. Checking pointsToAvoid in isTileWalkable prevents cutting through these corners.

Not 100% sure if this behaviour is appropriate in all situations or if this should become a separate setting?

robbeman avatar May 20 '22 14:05 robbeman

This makes sense to me. Do you mind adding a new unit test which succeeds with this change, but would fail previously?

prettymuchbryce avatar May 24 '22 14:05 prettymuchbryce

I've added the unit test. When commenting out my previous change it will fail by finding a path through the corners of the points marked to avoid.

robbeman avatar May 28 '22 07:05 robbeman