Bug report: waves of units go right when blocked by other units

Hi there, I ran into this issue, here is an example:
Animation

looking at the implementation, I noticed that there’re some code in “JobHorizonAvoidancePhase2” are suspicious. basically units would behave differently if they as a group are matching to different direction, it should be direction agnostic or relative to target direction. here the logics is like, when my neighboring units are going approximately up, I should go to my right(minAngle). when my neighboring units are going down, I should go to my left(maxAngle).

right now my temp fix is like this, so it’s direction agnostic now, would like to hear your ideas

Hi

This is by design. Having a consistent direction that they move in reduces the risk of agents choosing different directions and causing blockages because they want to pass each other unnecessarily. In the future, I want to replace it with some smarter logic that only has a small bias towards the right side and is otherwise smarter about which side to pass a group of agents on.