Skip to content

setNavDestination

setNavDestination(world, entity, target): void

Defined in: ai/nav/NavAgent.ts:66

Point a NavAgent at a world position and (re)arm it. Safe to call every frame (e.g. to chase a moving target) — the system only replans when the target actually moves or the repath timer elapses.

World

number

Vec2

void