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

[Feature Request] Pathfinding force to grid #82

Open
DawidIzydor opened this issue Jun 10, 2024 · 2 comments
Open

[Feature Request] Pathfinding force to grid #82

DawidIzydor opened this issue Jun 10, 2024 · 2 comments

Comments

@DawidIzydor
Copy link

Currently the Pathfinding works by creating a path either on center of the tile or on edge of the tile. Add an option to force to grid so paths are created only the center of the tile. For example below, I'd want the path to be created by going a tile left and then a tile to the bottom (to not go through wall) - so 10 ft. Right now it's instead created to an intermediate point and getting a 5ft path instead
obraz

@Cuingamehtar
Copy link

image
Another example of pathfinder not counting tiles correctly.

@caewok
Copy link
Owner

caewok commented Aug 13, 2024

There is a toggle now (v0.10.1) that will force the pathfinding to the grid. At the moment, it does this after the path is found. This means it will still find a path through spaces smaller than grid size and will force to grid only when it will not result in a collision with a wall. So maybe 90% of what you want.

It is theoretically possible for me to create a different pathfinding algorithm that will use only grid spaces. Most of the time, though, this is not what Foundry players actually want as it would not pathfind through smaller spaces (e.g., doorways not aligned with a grid, etc.). If I find some time I might try to set that up as an option, but it would take some effort.

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

No branches or pull requests

3 participants