Part of StarfallEx namespace
๐ External
navmesh.getNearestNavArea(pos, maxDist, checkLOS, checkGround)๐ Has LDoc๐๏ธ 0 viewsUpdated 2 months ago
Description
Returns the closest NavArea to given position at the same height, or beneath it. This function will ignore blocked NavAreas. See navmesh.getNavArea for a function that does see blocked areas.
Parameters
| Name | Type | Description |
|---|---|---|
pos | Vector | The position to look from |
maxDist | number | Maximum distance from the given position that the function will look for a CNavArea (Default 10000) |
checkLOS | boolean | If this is set to true then the function will internally do a trace from the starting position to each potential CNavArea with a MASK_NPCSOLID_BRUSHONLY. If the trace fails then the CNavArea is ignored. If this is set to false then the function will find the closest CNavArea through anything, including the world. (Default false) |
checkGround | boolean | If checkGround is true then this function will internally call navmesh.getNavArea to check if there is a CNavArea directly below the position, and return it if so, before checking anywhere else. (Default true) |
Returns
| Type | Description |
|---|---|
NavArea | The closest NavArea found with the given parameters, or a NULL NavArea if one was not found. |
Examples
No examples available.
Used In
No usages found in the codebase.