Different heights on doors and actors

I’m trying to setup path-finding with doors and actors of different heights using a Grid Graph. I have a couple of questions, but first I’ll explain what I did so far.

All the level design is created in runtime, so I don’t have full control over the graphs nodes using the editor. In order to handle doors, I am putting the doors and their parent wall sections on an ignored layer before scanning the graph. This is working nicelly for me so far.

First question: is this a decent way of handing doors? Is there a better way? Maybe a proper ‘Door API’, or something to that effect?

Second question: now what I want to add doors and actors of different sizes, this approach won’t work anymore - it would if I could have a different graph for each actor, but as I understand, we should have only one graph per scene, right? How could I solve this? Can I have more than one graph in the scene?

Sorry if these questions are too noob, but I don’t think they are.

Answering my own question, in case it helps anyone else later:

After re-reading the docs, I saw that “The Graphs area holds all the graphs in your scene, you may have up to 16 but usually 1 or 2 will be sufficient. A single graph is usually to be preferred.”

All I need is to have one graph for each possible size of actor and I’m good. (In my case it will be tiny (critters), small, normal, large.

Hi

  1. Yeah, I guess that works.
    Usually I use some kind of GraphUpdateScene component attached to the door so I can control when units can pass through it and when they cannot.

  2. Your solution works, however there is also another way. You can use tags to mark nodes as being some distance away from the closest wall.
    See http://arongranberg.com/astar/docs/class_pathfinding_1_1_grid_graph.php#af156f09628f08d32091ea67e48e42b71

I see, much better! The documentation is a bit scarce - if I understand it correctly, all I need is to set the erosion in the ‘rat door’ node to ErosionX, and set my rat’s Seeker traversableTags to that too?

Thanks!