Skip to main content

NavMeshQueryFilter.SetAreaCost(number areaIndex, number cost)

Sets the pathfinding cost multiplier for this filter for a given area type.

Parameters:

NameTypeDescription
areaIndexnumberThe area index to set the cost for.
costnumberThe cost for the supplied area index.

Usage

---@type NavMeshQueryFilter
local navmeshqueryfilter;

---@type number
local areaIndex;

---@type number
local cost;


navmeshqueryfilter.SetAreaCost(areaIndex, cost)

Extra Detail

Calling SetAreaCost the first time on a NavMeshQueryFilter object causes an internal allocation of the maximum 32 cost modifiers.