Skip to content

five-on-it / packages/ai/src/pathfinding / smoothGridPath

Function: smoothGridPath() ​

smoothGridPath(grid, cells, mask?): object[]

Defined in: packages/ai/src/pathfinding.ts:438

Pulls the string of a grid path: from each point, the farthest later point in a clear straight line is the next waypoint, so the walk cuts the corners the cells forced.

Parameters ​

grid ​

NavGrid

cells ​

readonly number[]

mask? ​

number = NAV_BLOCKED

Returns ​

object[]