Reputation: 127
I'm making a RTS game and I'm having problems when I order my Units to attack
I'm using NavMesh
and all the units in the game are NavMeshAgents
, I played with the stopping distance to stop the agents colliding with each other but when they have to attack the enemy they don't detect other agents and instead of surrounding the objective they stack and only one is fighting.
The code I use is very simple
navmesh.Destination == objective.transform.position;
I tried to make all units navmesh
obstacles but they speed up a lot and start colliding with each other.
I saw other questions related but where from 2014 so maybe are some updated solutions to use in a case like a RTS game.
Could you help me please?
Upvotes: 1
Views: 241