AI Characters Always Turning Right in 2D Game

  • A* version: [5.2.4]
  • Unity version: [6000.0.27]

녹화_2024_11_20_16_57_26_651
I am currently using the A* Pathfinding Project asset to develop a 2D game.
I implemented AI movement using the FollowEntity component.
However, as shown in the video, when the characters avoid obstacles, they take the path to the right even though the left side is open.
I want the characters to move along the shortest path without favoring one direction.


FollowEntity Component of ‘Green Circle’

1 Like

Hey there, are you able to provide any more information on your setup? I’m not getting the same results on my end.


Test.cs is attatched Green Circle


That’s AStarPath and RVOSiumulotor

Chiming in on this. We’re also using the RVOController-component to handle the steering of our agents. And we observe the same behavior. If a crowd of agents move along the Z axis (positive direction), they tend to crowd counter clockwise on/near the common target. If they move along Z axis (negative direction), they crowd clock wise. Along positive X and the crowd counter clockwise (and wise versa).

So angle of approach and general direction seem to cause a specific circling behavior. Which looks a bit odd. They should crowd around the target in equal left/right amount, but they dont.

Hi

The local avoidance system has a bias for turning right, to break symmetries. This is actually very useful in most situations, since it will make agents resolve crowded situations much more quickly.
You can adjust the strength of this bias on the RVOSimulator component (it’s called the “Symmetry Breaking Bias”).

1 Like

Thanks for pointing that out! Totally missed that in the documentation.

Edit: Although the documentation mentions using a negative bias should make them turn left. It looks as if only positive values are accepted