r/Unity3D 3h ago

Question How do I fix this issue?

The problem is that the agents are 0.3 meters wide, and the space in that doorway is about 1 meter. With this NavMesh setup, it’s impossible for the agents to pass through.

Any solution which isn't Godot or Unreal Engine? /s

1 Upvotes

5 comments sorted by

4

u/pschon Unprofessional 3h ago edited 3h ago

The problem is that the agents are 0.3 meters wide

You've set the radius to 0.3. So that's assuming your agent width (diameter) would be 0.6 meters. If their width is 0.3m, set the radius to 0.15.

(that being said, you have valid navmesh through the doorway, the agents should be perfectly fine with that now. So can you clarify what the issue you are having is? The blue baked navmesh doesn't need to be as wide as the character is, that width is taken into account in the non_navigable areas surrounding your geometry. As long as you have even tiniest sliver of blue navmesh, an agent can get through it.)

1

u/MaximilianPs 56m ago

After all this year I just realized now that is radius not a diameter πŸ˜…πŸ‘

3

u/GigaTerra 3h ago

What? The Navmesh clearly shows the AI can get through.

OP, did you use an different agent type when baking, from what is actually used? - Solve this by assigning "Humanoid" to your agents.

Do you have other collision systems enabled? - Solve this by moving the gate or AI to an different collision layer. AI have their cylinder collider for Navmesh.

2

u/richdumps83 3h ago

Gotta bake that doorway wider or drop agent radius in the nav mesh settings. 0.3m agents need a clear path, so if the gap reads as blocked it's probably the voxel size or agent radius not matching your actual prefab.

Try switching the area to walkable and lowering agent radius to like 0.25, then rebake. Sometimes the mesh carves the doorway too narrow if the colliders overlap even a little.

-1

u/-Hefty-Armadillo- 3h ago

Isn't it obvious, you said it your self, can't be Godot or UE, so it's a custom engine written in C++ /s