- Home /
Any way to make Nav Mesh Agents not collide?
Hello all.
Firstly, I've been learning how to use Unity for 2 weeks now and I have to say thank you to all of the people who write in this forum. You've already helped me more than you know.
I'm trying to make a game with multiple enemies making their way through a maze. Most of these ignore the player and just go about their business. The thing is that I want them to be able to collide with the player and walls but not with each other.
I've followed the instructions in this link but it doesn't seem to work. (The link outlines putting objects that you don't want to collide with each other on the same layer and then using the collision matrix to stop them from colliding with each other. It didn't work.)
Does anyone have an answer?
Thank you.
Nav$$anonymous$$eshAgent have their internal collider and it's maybe your problem. Try to reduce the agent radius size to the $$anonymous$$mimum and add a common capsule collider on your agents.
I tried that. Unfortunately they still collide with each other. Additionally such a small radius agent makes the objects overlap the walls of the maze whilst navigating through it. Thank you for your suggestion, however.
If you remove Nav$$anonymous$$eshAgent are they still colliding ?
No Nav$$anonymous$$eshAgent, no collision. It seems Nav$$anonymous$$eshAgent isn't working as intended. I've found other issues with it, too. This may mean Unity isn't going to work for my game.
That's a shame.
Answer by tyrex · Sep 17, 2015 at 05:59 PM
I had the same problem and what worked for me was to set obstacle avoidance to "None" and increasing the radius of the agents so that the resulting mesh was a bit away from the walls the agents should not collide with
Answer by mubashar437 · Apr 30, 2015 at 07:17 AM
tweak "Obstacle Avoidance Quality" and "Obstacle Avoidance Priority". these causes more load on CPU so find a sweet spot with them.
A bit advance but try Raycast with navmesh agent...
Good idea but unfortunately didn't work. I'm just going to have to make them avoid each other. Not the best option but better than having the game not work!!
Your answer
Follow this Question
Related Questions
How do I get a navmesh agent to stop at the edge of a collider? 0 Answers
NPC's bump into eachother trying to reach a position 1 Answer
OnTriggerEnter not activating with NavMesh movement 2 Answers
No player is colliding with enemy even with capsule collider !!! Please me help me. 0 Answers
NavMesh on collision dectection activate,On collision activate navMesh 0 Answers