NavSurface
此内容尚不支持你的语言。
Defined in: ai/nav/NavSurface.ts:55
The active navigable world, however it was built.
Properties
Section titled “Properties”
readonlyup:Vec3
Defined in: ai/nav/NavSurface.ts:62
Which way is OFF the ground here — the direction anything drawn ON this surface is lifted along so it does not fight the floor for pixels. A flat grid’s is +Z, toward the viewer of a scene laid out in x/y; a spatial mesh’s is +Y, out of the ground it follows.
Methods
Section titled “Methods”describe()
Section titled “describe()”describe(
sink):void
Defined in: ai/nav/NavSurface.ts:80
Hand the shape of the walkable world to a drawer.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
findWorldPath()
Section titled “findWorldPath()”findWorldPath(
from,to,opts?):Vec3[] |null
Defined in: ai/nav/NavSurface.ts:70
Plan a world-space route between two world points, or null when there is no way. The waypoints carry all three axes: on a flat surface the third is the plane the scene is drawn on, on a spatial one it is the ground the route walks over.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Vec3[] | null
isNavigable()
Section titled “isNavigable()”isNavigable(
p):boolean
Defined in: ai/nav/NavSurface.ts:77
Whether an agent may stand at a world point. Asked of a place the agent has not been routed to — a step sideways to get round another body — which is why it is not the same question as “is there a route here”.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”boolean