manuelVo / foundryvtt-routinglib

A Foundry VTT library that allows other modules perform pathfinding within the scene
MIT License
3 stars 7 forks source link

[Bug] Pathfinding goes the wrong way around obstacles #17

Closed revilowaldow closed 1 year ago

revilowaldow commented 1 year ago

When trying to pathfind with drag ruler the pathfinding goes the wrong way around obstacles, placing the waypoints within the walls rather than outside them.

image

manuelVo commented 1 year ago

This indeed looks off. Please post a screenshot that shows the walling of the scene, maybe that'll give a clue as to what's going on.

revilowaldow commented 1 year ago

Ahh you know what, someone else walled this map, I recon they're just over halfway set back. This looks like user error, apologies for wasting your time. Reason I bothered coming with the bug report is this is level (and map) 3 of the same area and looking at them now they all seem to have this walling offset so the issue has been recurring for a few sessions. image

manuelVo commented 1 year ago

If you want to fix the pathfinding without re-doing all the walling a quick fix might be to draw a diagonal wall from the outwards corners of the walls to the respective corner in the walling. This prevents the pathfinder from skipping corners without having to do too many adjustments.