Yes I think it may be possible to build a pathfinder function using something like this plus check if certain sqm are walkable. Although it seems that it would be rather difficult. Especially in certain situations.