Expand description
Grid A* pathfinding shared by the gfx client and region sim (hired workers).
Structs§
- NavBlocking
Circle - NavWorld
- Static + dynamic obstacles for one path query.
- Path
Session - Path
Steer - Terrain
Kind NavParams - Per-kind move speed + impassable flag from content (
terrain-kinds.yaml). - Terrain
NavTable - Lookup table for path costs — populated from the terrain kind catalog (no hardcoded speeds).
Enums§
- Path
Mode - How A* weights walkable terrain.
Constants§
- ARRIVE_
RADIUS_ M - DEFAULT_
COST - Grass baseline A* cost (and Direct walkable cost). Fastest uses
BASE / speed. - DEFAULT_
PLACED_ PROP_ BLOCK_ RADIUS_ M - Default nav radius when a placed prop has
blocking: truebut radius 0 in data. - DEX_
MOVE_ COEFF - Dexterity contribution to move speed (display DEX 1–100 scale).
- PATH_
CLEARANCE_ M - Extra clearance so paths don’t hug walls.
- PLAYER_
RADIUS_ M - WAYPOINT_
RADIUS_ M - Z_
LEVEL_ TOLERANCE
Functions§
- cell_
walkable_ for_ path - circles_
from_ placed_ containers - Blocking circles for placed props that have
blockingon the item template (AOI view). - circles_
from_ views - Build blocking circles from protocol views (resource nodes + living NPCs).
- collides_
player_ at - effective_
move_ speed_ mps - Effective horizontal speed (m/s) for travel ETA and worker movement.
- find_
path - Plan a path from
(from_x, from_y, from_z)to(to_x, to_y)using goal z inferred fromfrom_z. - find_
path_ with_ goal_ z - goal_
z_ for - is_
walkable_ at_ z - snap_
nav_ goal - Outdoor travel goal snapped clear of buildings, trees, NPCs, and placed props.
- terrain_
cost - A* cell cost for
mode. Impassable →u16::MAX(blocked). - terrain_
is_ impassable - terrain_
kind_ view_ from_ id - Map catalog id (
road,shallow_water, …) to protocol view. - terrain_
move_ speed_ mult - transition_
vertical - Vertical intent while auto-walking (stairs).