Tactical agent: stop the agent from traveling to the other side of the circle through the center using the surround task

MarkusKer

Member
As far as I can tell the surround task has lines of codes that should prevent this. However, the agents seem to cross way too narrow to the target.
Is there a way to make the agent circle around the size of the circle instead of in between the target and other agents? Sort of traveling at a bigger distance to the other side?

The value of "detour" is set to true when this happens, meaning the code should successfully set a temporary destination.
I tried messing with the offset value but with no results.

Regards,
Markus
 
1675284335521.png
I visualized the destination from the detour which is in a clear line from the leader across the target. I am not sure if it should not be at the height ot the target.
 
When the task starts the agents will rearrange in the order that the task started in. This is on my list of things to look at but right now you are not able to change the starting position of the agents.
 
The solution is to use a recast graph and the mesh-cut script attached to the player. The agent won't be able to travel near the player.
 
Top