I’m using a recast graph. In my scene there are rooms separated by doorways, and physics furniture. Everything is procedurally generated. I want my follower entities to avoid the furniture, however I dont want players to be able to just create a simple barricade by moving a table near a doorway to create an impassible hole in the graph. Players could also knock things over to create a barricade in the middle of a room, so I can’t just put node links at doorways.
In such barricade cases I’d like the follower to just ignore the physics stuff and plow right through it, but only if no other option exists. I’m new to this - what are my options for doing so? I can think of two things, I dynamic node link system which sounds like both a huge and a default feature I don’t know about and can’t find, or have a second nav mesh that doesnt use the furniture and have the agent switch to that when there isn’t an existing path.
I’ve been messing around with Per Layer Modifiers but they don’t seem to work. I can get the graph to recognize that a specific layer is high cost (by setting the cost very high on the agent, but not too high or it gets ignored). But the agent just walks right through the high cost area.
If I set the waypoint inside the high cost area, the debugger shows the cost as in the millions. But if I set it on the other side of the high cost area, the cost shows normal and the agent walks right through it. The “show penalty” debugger also doesnt show any changes. Lots of things here either broken or unintuitive.
When I make the target nearby, it goes right to it. When I make the target on the other side of the high cost area, it paths around it, then just goes right through the high cost area. What am I doing wrong?
Few hours later and a bit more learning, I have a better video showing off the issue. Why does it only avoid the tag area when I set it to be not walkable? And not when the cost is in the millions?