Tsukikage Castle Town: A Sengoku Town of Rooftops, Temples and Rice Terraces, with a Town Builder
README.md
TownNav
Lets characters the computer controls find their way round a castle town, on navKit. TownNav.bake() (yields, so call it from a task once the town stands) bakes a navKit grid map named sengokuTown with 1 m cells over the town's ground floor: streets, lanes, courtyards, the bailey through its gates, the temple, the farm and the bunds between paddies. Roof colliders tagged noNav are left out, and the moat and river are blocked below the bridge decks, so walkers cross by the bridges. TownNav.findPath(from, to, opts) answers navKit's path between two stops (gate, street, market, teaHouse, temple, paddies, bridge, hall) or world points, and TownNav.walk(entity, stops, { loop, style }) adds a navKit NavAgent when missing and sends it along the stops in order. Both answer nil when navKit is missing or no town is built.