Zombies running through walls and game objects

My zombies don’t follow the laws of physics and choose to make there own path, is this because of the baked navmesh covers the whole terrain and zombies just follow the path where navMesh allows them to move and ignore all other parameters

The zombies will follow the navmesh if the navmesh allows them to do so.

The way to solve it is to not have navmesh where the obstacles are. You do this by making all the obstacles static before generating the navmesh.

image

I do think that even without it, the zombies will not be able to pass through the obstacles if their colliders are set up correctly. That is, they have both a collider and a rigidbody. They will try to walk through obstacles, but just run into it.

1 Like

Ohk the issue was my terrain was under my floor for my compounds and I had to flatten the whole are under the floor till the boarder soo my navMesh can disconnect the area b/w compound and the terrain soo the enemies are not allowed to walk through. And I connected the entrance to the compound with the terrain soo NavMesh.




can bridge the gap

I also Found out the Objected that you want the zombies to avoid can also be marked and deleted from nav mesh by using component of NavMesh Obstacles and tick carve soo it carves a hole in the navMesh path finding. for eg i have marked the walls on the parameter of the level as navmesh obstacle’s and ticked carved soo the zombies don’t go outside that map even if the player somehow manages to escape the level

Hi @Imadity,

Were you able to solve the problem(s) in your game?


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms