Skip to main content

Class: UniNavigation

Methods

GetClosestTakeoffPos()

static GetClosestTakeoffPos(): IVector3

Returns the a position nearby that is suitable for takeoff. Use this before mounting and flying to minimize the chance of getting stuck.

Returns

IVector3


IsNavigating()

static IsNavigating(): boolean

Reflects weither or not the bot is currently processing navigation, no actions should be performed while this is true. If you need to perform a different action, the navigation should be aborted first.

Returns

boolean


static NavigateTo(targetPosition, pathTraversible, abortTick, avoidSpheres?, bypassAvoidSpheres?, arriveRadius?): void

Starts the navigation process to the target position.

Parameters

targetPosition: IVector3

The position to navigate to.

pathTraversible: boolean

If true, the bot will assume there are no obstacles in the way and will not attempt to avoid them. If false, the bot will calculate a traversible path that minimizes the remaining distance to the target position at navigation end.

abortTick

A function that will be called every tick, if it returns true the navigation will be aborted.

avoidSpheres?: DynamicObstacle[]

A list of dynamic obstacles to avoid while navigating. Use this to avoid certain monsters while navigating or avoiding a certain spot on the map.

bypassAvoidSpheres?: boolean

If true, bypass aborting nav on player intersection with avoided obstacles

arriveRadius?: number

for flying only. Flight nav request will return a landing position within this radius that can be safely ground nav'd to the actual targetPosition.

Returns

void


RegisterAvoidanceProvider()

static RegisterAvoidanceProvider(avoidanceProvider): void

Parameters

avoidanceProvider

Returns

void