Some areas are marked walkable and some not

Hello everyone, I am relatively new to this project and I’ve encountered a problem that I’m struggling with for a good week or so. I have a 2D game that has multiple worlds (basically 3 chunks each containing 3 maps, that I randomly activate at runtime aka setActive(true) ).
This is what I’ve done:

  • I have some prefabs called “Hole” where the agent (enemy) should not walk. This prefab has a GraphUpdateScene with “Modify Walkability” checked and “Walkability Value” unchecked.
  • In my tile map I have the holes on a separate layer called “Holes” (each map is built like this) and I’ve set the Pathfinder’s Obstacle Layer Mask to “Obstacles, Holes” (the obstacles are the trees in my scene and they have a collision box defined and they work just fine)
  • I’ve also tried adding a tag to the GraphUpdateScene “Hole” and then setting the Seeker’s Tag Hole to not traversable

After all of this, some of the holes are marked as walkable and some are not. Can you help me in finding a solution to this problem?

I use the free 4.2.17 version

Here are some screenshots to better illustrate the problem:

Here are some more information regarding this issue:

  • Hole-3 Prefab settings:
    I also have 2 other prefabs Hole-2 and Hole-1, but they have the same components & settings

The holes with their layer:

As you can see, some of the holes are detected as not walkable (as they should), but some don’t. For example, in this image the 4 Hole-3 objects from the right, are correctly detected but the one from the (far) left is not. The Hole-1 objects are all marked as walkable although they shouldn’t.

Answering my own question just in case someone struggles with GraphUpdateScene in a 2D environment. The problem was easy: Check your Z-axis! I’ve spent waay too much time on this issue…

1 Like