pathfinding.createGrid

Section: Pathfinding (A*)

What it does

pathfinding.createGrid creates a Grid in pathfinding. It takes cx, cz, w, h and cellSize. cellSize is optional.

Signature

pathfinding.createGrid(cx, cz, w, h, cellSize?)

Arguments

  • cx
  • cz
  • w
  • h
  • cellSizeoptional

Example · generated

function start() {  pathfinding.createGrid(1, 1, 1, 1);}

pathfinding.createGrid is called with values of the shape its signature asks for. The code sits in start(), which the engine calls once, when the entity spawns.

4 members in pathfinding