🧭GridNav
Table to work with in-game navigation API.
You should always call `GridNav.ReleaseNpcMap` after you done with your build pathing
excluded_npcs [?]
CEntity[]
|nil
table with npc to exclude from the map. for example you want to exclude local hero if you build path from local hero position (default: nil)
includeTempTrees [?]
boolean
true
if you want include temp trees to the map e.g. furion's 1st spell, iron branch (default: true)
Creates a new GridNavNpcMap
ReleaseNpcMap(npc_map: GridNavNpcMap
): nil
GridNavNpcMap
): nil
Releases allocated memory for GridNavNpcMap
flag [?]
number
flag to check (default: 1)
Returns true
if the world position is traversable.
BuildPath(start: Vector
, end_: Vector
, ignoreTrees [?]
: boolean
, npc_map [?]
: GridNavNpcMap
|nil
): Vector[]
Vector
, end_: Vector
, ignoreTrees [?]
: boolean
, npc_map [?]
: GridNavNpcMap
|nil
): Vector[]
ignoreTrees [?]
boolean
true
if you want to exclude static trees from the pathing (default: false)
npc_map [?]
GridNavNpcMap
|nil
map with the npc's positions which works as additional mask for terrain map (default: nil)
Build path from start to end. Returns an array with builded positions.
Example
IsTraversableFromTo(start: Vector
, end_: Vector
, ignoreTrees [?]
: boolean
, npc_map [?]
: GridNavNpcMap
|nil
): boolean
Vector
, end_: Vector
, ignoreTrees [?]
: boolean
, npc_map [?]
: GridNavNpcMap
|nil
): boolean
ignoreTrees [?]
boolean
true
if you want to exclude static trees from the pathing (default: false)
npc_map [?]
GridNavNpcMap
|nil
map with the npc's positions which works as additional mask for terrain map (default: nil)
Lite version of GridNav.BuildPath function which just cheking if the path is exists.
DebugRender(grid_range [?]
: integer
, npc_map [?]
: GridNavNpcMap
|nil
, render_cell_flags [?]
: boolean
): boolean
[?]
: integer
, npc_map [?]
: GridNavNpcMap
|nil
, render_cell_flags [?]
: boolean
): boolean
grid_range [?]
integer
grid radius in "cell units" from Vector(0,0,0) (default: 50)
npc_map [?]
GridNavNpcMap
|nil
map with the npc's positions which works as additional mask for terrain map (default: nil)
render_cell_flags [?]
boolean
render the flags value for each not approachable cell (don't think you ever want to see this numbers, so ignore this arg) (default: false)
Debug render of current GridNav with GridNavNpcMap (if provided)
Last updated