pathfinding.followPath

Section: Pathfinding (A*)

Ce que fait ce membre

pathfinding.followPath suit Path sur un objet pathfinding. Il prend meshId, path, speed et dt, et rend reachedEnd.

Signature

pathfinding.followPath(meshId, path, speed, dt) → reachedEnd

Arguments

  • meshId
  • path
  • speed
  • dt

Exemple · engendré

function start() {  const reachedEnd = pathfinding.followPath('main', '/assets/file.png', 1, 0.016);}

pathfinding.followPath est appelé avec des valeurs de la forme que sa signature réclame. Le code est dans start(), que l'engine appelle une fois, à l'apparition de l'entité.

4 membres dans pathfinding