Navigation · interface

NavGeometry

Geometry to a field of where an agent of a given size could stand.

Explained in Navigation.

interface NavGeometry
import type { NavGeometry } from '@driftengine/nav';

In depth

Why the refusal reopens, and it is the module's own words. core/src/nav/navGraph.ts says in its header that it is a graph rather than a mesh, that this is a decision rather than a first step, and that "if a world's walkable space genuinely is a region, this is the wrong structure and a mesh is the row that is still open." A streamed open world is that world. The module named its own trigger; this pulls it. The graph is not replaced — it stays right for roads, corridors and docking lanes, which is what consumers kept arriving with.

A voxel field and not a heightfield, and an overhang is the whole reason. A bridge over a path is two walkable surfaces at one horizontal position. A heightfield holds one of them, so an agent under the bridge is either standing on the bridge or standing in the void — and which of those it is depends on which triangle happened to be rasterised last.

The agent's size is applied here rather than at query time. Eroding at query time means every query pays for it and every query can get it wrong. Eroding here means the mesh is the space that agent can occupy, which is what a navigation mesh is for.

Properties

NameTypeDescription
positionsreadonlyFloat32Arrayxyz per vertex.
indicesreadonlyUint32ArrayThree per triangle.