Skip to content

Conversation

@robbeman
Copy link

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?

To prevent corner cutting through obstacles
@prettymuchbryce
Copy link
Owner

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

@robbeman robbeman changed the title fix: pointsToAvoid are not walkable Fix corner cutting of pointsToAvoid May 28, 2022
@robbeman
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants