How to let agent not rotate around when the path has been block

Video:


In Unity native NavMeshAgent, when the agent has been block by other agent or obstacle. it will try to move forward directly. (Blue Arrow in Video)

but in A* Pathfinding Project. the agent will try to move around a lot to avoid each other. which in my game i do not want them do that behavior. (Pink Arrow in Video)


the RichAI have a property called Stop when destination is crowded that behavior is work for my game. but unfortunately, i can’t set the destination to the wall.

when the agent was created , the destination has been set to command center (the main building). so they all run to attack it. when they reach the wall , they will stop to attack the wall, but those agent not attack at wall still think the command center is the destination.


i try to set

RVO Controller

Agent Time Horizon = 0
Obstacle Time Horizon = 0
flowFollowingStrength = 1

none of them work.


so how can i do that? thanks.

Hi

currently i found a solution. and the result is pretty good. and easy to implement.

so i just post here in case some have same problem.

all you need to do is disable RichAI rotation control. and do it manually by this code :

 var rotateQ = Quaternion.LookRotation(mRichAI.steeringTarget - mTrans.position);
 mTrans.rotation = Quaternion.Slerp(mTrans.rotation, rotateQ, Time.deltaTime * $rotateDelta);