- Home /
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 Nav$$anonymous$$esh 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 ins$$anonymous$$d that you don't move.
Answer by platinio2007 · Jan 07, 2018 at 11:40 PM
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.
Your answer
Follow this Question
Related Questions
Need help with a spawning system similar to Fieldrunners 2 Tower defense. 0 Answers
Creating custom pathfinding solution stack overflow 0 Answers
Make an agent finds his way out 0 Answers
Recentering an infinite world that has a NavMesh. 0 Answers
Make object follow a track but player can move it side to side 1 Answer