Hello!
I’m making Horror game with basically two types of agents. Human, which is small, and Monster that is bigger than human, especially in width (note: vents and corridors have different sizes).
In Navigation window…
The standard baking is working for the built-in humanoid agent - but I don’t want to allow the monster to pass some ways because it is too big to go through them. Changing values in NavMesh Agent component in Monster, like “Radius” does not work like I imagine it should. Monster will still go same way like human would, colliding with its model and going to places where it should not be able to go.
Human with humanoid agent type in NavMesh is working correctly but changing the size of Agent in Bake window will cause him to not access ways he could go, while it will fix monster pathfinding, logical.
(It’s like I’m forced to choose between Human Enemies and Monster Enemy)
I tried using NavMesh Surface (of course on static object that is not moving), with different agents, areas and their value…
It was kind of working, I mean, Agents were working and they were aware of their surface…
But, using NavMesh Surface element and its baked Areas caused the agents to move towards a wall that was blocking their way instead of going through the big corridor - the only way to leave the room … adding NavMesh Obstance didn’t work.
Strange is that NavMesh’s coloured area clearly shows that there is no way through, Agent should not have problems to find the way to leave.
Going back to standard baked navigation and changing Monster’s NavMesh agent back to built-in Humanoid is working like it should, Monster or Human will find a way to leave. Back to the beginning, sadly.
Also, I wanted to make Agents prefer to move in the centre of corridor instead of hugging walls, so I tried to make big Agent, that with NavMesh baked surface created specific area I wanted. I changed the value of it, so Agent would prefer to use it than other accessible ways if available.
Conclusion:
I cannot make differently sized agent for a bigger enemy, to limit its possible way to the player.
Baked navigation pathfinding is working, NavMesh Surface not.
I’m missing something or…? Any ideas? Thank you in advance! I hope that I mentioned all of the crucial pieces of information and details.
Other information:
Using Unity 5.6.2f1 (64 bit) Personal Edition