navmesh obstacle

Lzardo

New member
Hello

I´m developing an RTS game, but, when two or more characters try to attack the same target or move to the same point they keep pushing each other.

I happens specially when one stops at attackRange (the distance it can star firing it´s weapons), the second one that arrives just push it in order to use the same location.

One idea that I tried was to stops the NavmeshAgent and turns the NavMeshObstacle (both in the same object) whenever the navMeshAgent.isStopped = true.

problem is, it brings several problems, for example.

1) without the NavMeshAgent it does not have any way to know when isStopped is false...

2) without the agent it has no way to find any path...

Anyway, am I´m missing something? Or is there a better way to do it? To improve avoidance? I tried Astar already and it works WAY better, but brings a lot of other difficulties so I wanted to avoid it if possible, also, it seems to not work on Android...I think...
 
Behavior Designer doesn't determine the actual path - it just sets the destination of where the character should move to. You may have some more success with the A* Pathfinding Project instead of the navmesh.
 
Thanks, I´m testing Pathfinder, but it brings other problems, for example I don´t have access to the VELOCITY variable...

Or, I do, but it does not seems to work, it´s never zero...

Using:

IAstarAI.velocity

It never updates, even when the agetn stops.
 
Top