A* Pathfinding Project

GraphUpdateScene - layered sloping surfaces


#1

Hi,
I’ve faced very unconvinient problem with sloping surfaces. As you can see on screenshot there are ladders leaning against a wall.

When I add GraphUpdateScene + RecastMesh to them I can’t make it to bake unwalkable only on ledder - ground under it comes unwalkable too. I’ve tried to modify GraphUpdateScene points manually but it always is recrangle, no mater what I do. Is there a setting that can fix this one (NavmeshCut is not an option, unwalkable is only for “debugging” reason, there will be walkable layer but with penalty)?


#2

GraphUpdateScene relies on AABB axis aligned bounding boxes, unless you specify the points. (which would pretty much be the same result as there is so few nodes here).

Take a look at GraphUpdateShape, and see if it works better for you.

Alternatively, depending on your gameplay etc you could make the ladders a NodeLink, though NodeLink doesn’t support tags, it’s rather easy to add.
I can share my version if need be.


#3

Thanks for quick answer.
Both solutions sounds good, but NodeLink is not “flexible” I guess, that means that if level designer changes enviro then he has to change NodeLinks too (thats not acceptable for me, I had to do system that works “out of the box” for level designer).
GraphUpdateShape looks promising, from documentation and code I’ve figure out that when I use points on GraphUpdateScene it creates GraphUpdateShape. It is better but still I have unwalkable area under ladders. Problably I’m missing sth. https://i.gyazo.com/2365b8a9517eb6f389c6f2fe134c0457.jpg

Edit:
Min bounds height is set to 21 but it changes nothing, it was default, then 0.1, then 21, result was the same.


#4

You can make the nodelinks part of your ladder prefab. That way LD can move then as often as they want. A simple rescan later it will still work


#5

Ok, good idea, I will try this. Can you share NodeLinks with tags?


#6

Here is a patch file with the changes I made to get this working:

Not sure how good this upgrade is though, since it will effect ALL connections in the game, not only for nodelinks. ( there is a bunch of unity files also in this Patch, I don’t have the time to clean it up at the moment )