mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-23 02:49:46 +00:00
update core:pathfinding component
This commit is contained in:
parent
db8c684855
commit
a0c3e546fe
1 changed files with 2 additions and 0 deletions
|
|
@ -5,8 +5,10 @@ local started
|
||||||
local tsf = entity.transform
|
local tsf = entity.transform
|
||||||
local body = entity.rigidbody
|
local body = entity.rigidbody
|
||||||
|
|
||||||
|
local size = body:get_size()
|
||||||
agent = pathfinding.create_agent()
|
agent = pathfinding.create_agent()
|
||||||
pathfinding.set_max_visited(agent, 1e3)
|
pathfinding.set_max_visited(agent, 1e3)
|
||||||
|
pathfinding.set_width(agent, math.max(size[1], size[3]))
|
||||||
pathfinding.avoid_tag(agent, "core:liquid", 8)
|
pathfinding.avoid_tag(agent, "core:liquid", 8)
|
||||||
|
|
||||||
function set_target(new_target)
|
function set_target(new_target)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue