Skip to content

findPath

findPath(grid, start, goal, opts?): Cell[] | null

Defined in: ai/nav/pathfind.ts:42

Find a grid path from start to goal, inclusive of both endpoints. Returns null if unreachable (or if either endpoint can’t be snapped to a walkable cell). A start equal to goal yields a single-cell path.

NavGrid

Cell

Cell

PathfindOptions = {}

Cell[] | null