Littlefat1213 Posted September 13, 2022 Share Posted September 13, 2022 (edited) I found that some prefabs call TheWorld.Pathfinder:AddWall before they're spawned, such as "walls" "fence". Some prefab with bigger physics radius (such as "atrium_gate"、"nightmarerock")call these code instead ( i guess it's just like add a whole wall with bigger radius to fit the physics radius of gate ?) --Line 441~447 in "/prefabs/atrium_gate.lua" local function InitializePathFinding(inst) local x, _, z = inst.Transform:GetWorldPosition() TheWorld.Pathfinder:AddWall(x - 0.5, 0, z - 0.5) TheWorld.Pathfinder:AddWall(x - 0.5, 0, z + 0.5) TheWorld.Pathfinder:AddWall(x + 0.5, 0, z - 0.5) TheWorld.Pathfinder:AddWall(x + 0.5, 0, z + 0.5) end but that's all the prefabs i found that addwall .So should we add wall to all blockers? such as "pigking" ,"pond","rocks","homesign" Maybe it will make the case that creatures blocked infront of a blocker less likely to happen, such as Mr.pigman blocked between two ponds and can't get home but also some hostiles will be not blocked by the structure that player builded, such as the moonpig won't blocked by fossils, lavae won't blocked by homesign or lavapond with wall beside. I dont know , perhaps it doesn't matter. it may affect the performance of the pathfinder. You know , the Pathfinder Component works for all the creatures with locomotor component. It cost more time to calculate the path if more complex condition. Edited July 11, 2023 by Littlefat1213 Link to comment https://forums.kleientertainment.com/forums/topic/143163-should-we-addwall-in-pathfinder-to-all-blockers/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now