Skip to content

API Class Navigation

github-actions[bot] edited this page Nov 24, 2026 · 1 revision

Class: Navigation

Defined in: src/plugins/navigation/runtime/Navigation.ts:52

Constructors

Constructor

new Navigation(): Navigation;

Returns

Navigation

Accessors

debug

Get Signature

get static debug(): NavDebugSettings;

Defined in: src/plugins/navigation/runtime/Navigation.ts:92

What the navigation debug drawing shows in this World (toggle fields; drawing reads them).

Returns

NavDebugSettings


isReady

Get Signature

get static isReady(): boolean;

Defined in: src/plugins/navigation/runtime/Navigation.ts:87

True once this World's navigation has loaded.

Returns

boolean


loadedChunks

Get Signature

get static loadedChunks(): string[];

Defined in: src/plugins/navigation/runtime/Navigation.ts:82

The ids of the chunks loaded in this World.

Returns

string[]

Methods

findPath()

static findPath(
   from, 
   to, 
   agentType?
): NavPathResult;

Defined in: src/plugins/navigation/runtime/Navigation.ts:54

A path from from to to for an agent type: walking, flying or hybrid by the type's abilities.

Parameters

from

Vec3Input

to

Vec3Input

agentType?

string = ""

Returns

NavPathResult


isReachable()

static isReachable(
   from, 
   to, 
   agentType?
): boolean;

Defined in: src/plugins/navigation/runtime/Navigation.ts:66

True if an agent of the type can get from from to to.

Parameters

from

Vec3Input

to

Vec3Input

agentType?

string = ""

Returns

boolean


nearestPoint()

static nearestPoint(
   point, 
   agentType?, 
   maxDistance?
): NavNearestPoint | null;

Defined in: src/plugins/navigation/runtime/Navigation.ts:60

The nearest walkable point (or free air, for fly-only types) within maxDistance; null if none.

Parameters

point

Vec3Input

agentType?

string = ""

maxDistance?

number = 2

Returns

NavNearestPoint | null


raycast()

static raycast(
   from, 
   to, 
   agentType?
): NavRaycastHit | null;

Defined in: src/plugins/navigation/runtime/Navigation.ts:71

Walks the navmesh surface from from towards to; null if from isn't on the navmesh.

Parameters

from

Vec3Input

to

Vec3Input

agentType?

string = ""

Returns

NavRaycastHit | null


setAreaCost()

static setAreaCost(area, cost): void;

Defined in: src/plugins/navigation/runtime/Navigation.ts:77

This World's cost for an area (over its default, under agents' own areaCosts), or "excluded".

Parameters

area

string

cost

number | "excluded"

Returns

void

Clone this wiki locally