Browsing StarfallEx's section
โ† Back to ACE
Back to StarfallEx

SFEX.navmesh.getNearestNavArea

S๐Ÿท๏ธ Navmesh

Part of StarfallEx namespace

๐Ÿ”— External
navmesh.getNearestNavArea(pos, maxDist, checkLOS, checkGround)
View on GitHub|lua/starfall/libs_sv/navmesh.lua:236
๐Ÿ“‹ 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

NameTypeDescription
posVectorThe position to look from
maxDistnumberMaximum distance from the given position that the function will look for a CNavArea (Default 10000)
checkLOSbooleanIf 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)
checkGroundbooleanIf 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

TypeDescription
NavAreaThe 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.