Creating paths in an enclosed area

I suspect this may be a dumb question, so please bear with me!

I need to be able to create paths inside closed areas, but for the life of me I cannot get it to create them, it creates the inside area (the bit I want) as unwalkable, but the area around it as walkable.

How can I target the area inside so that it becomes walkable?

Here is the issue –


It seems like the ray that is used for collision testing hits an obstacle collider inside that area. Are you sure you have configured the layer masks or colliders correctly?

Hi, yeah Im sure, there are only 2 layers, walls and objects and only walls exist here in this scene. Its like it sees it as an eclosed area and wont look to pathfind inside it. Here you can see an image of the colliders on the wall layer, and the pthfinding scan.

Everything outside is walkable…

When generating the graph it doesn’t care about if an area is enclosed or not, it should generate nodes for all areas.

Re: screenshot:
I cannot see any explicitly unwalkable nodes (red cubes) inside the walls, only on the border (where it is correct). I counted the number of unwalkable nodes around the borders and I get 125 so the nodes inside are walkable, you just don’t see them for some reason. Do you have 3D gizmos enabled/disabled (try toggling it)?

Here is a shot with the tileset off so you can see the pathfinding result

oh hang on… I saw red and thought that was unwalkable, but actually is that just showing a different zone ?

Ah. That looks better. You can see that the nodes inside are walkable.
(each area (connected component) is given a unique color, this is explained in the get started tutorial, the second color seems to be red but it is still a walkable region).


thanks so much :smiley: I feel like a right idiot :wink: I saw red and assumed red = bad !

Yeah, maybe I should make that some other color… The color is generated by a script using some bitshifting pseudo randomness, but I have seen others being confused about it being red and thinking that meant unwalkable.