Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corner cutting of pointsToAvoid #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants