NavMesh Agent and NavMesh Obstacle on same gameobject?

hi …
i am using unity navigation system to simply tell enemy unit to attack to player .
units are melee and they go to target player correctly but pushing each other and with avoidance priority option it will be a little better but not enough . how can i tell them if another agent is on your way avoid it and find another path ?
if i add NavMesh Obstacle to a unit it will avoid itself.

> if i add NavMesh Obstacle to a unit > they will avoid himself I'm not sure how can you avoid or collide with yourself as a character (and not body parts of a character colliding each other)?

Navmesh agents should already be avoiding each other. Hell, the way to work around having Unity free and no navmesh obstacles is to just put in a navmesh agent instead that you don't move.

1 Answer

1

They are another sistems for that, example as simple as having a list of transforms for spots where enemy units can be attacking, example 8 positions around the player like in a circle, just before attacking ask for a position go to it and attack.