Object jittering shaking

  • A* version: [5.2.4]
  • Unity version: [2022.3.47f1]

In the game scene, both AstarPath and RVOSimulator are present.

Each monster object has the following components:

  • Seeker
  • AIDestinationSetter
  • AIPath
  • RVO Controller
  • Collider2D (is Trigger = false)

Additionally, monsters are set as obstacles within the RVO layer configuration.

All monsters move toward the player character as their target, but when they get too close, a jittering effect occurs, likely due to RVO (as they try to avoid obstacles). The speed of this left-right shaking is very fast, and I would like to reduce it slightly.

What would be the best way to achieve this?

My first thought would be maxNeighbours. Last time I saw this behaviour was when I had it not set high enough. This will put more of a load on CPU, however. If this doesn’t help, you could also add some information about your RVO Controller settings and we can take a look.

1 Like

Thank you for your reply
Here are the settings for the RVO controller of my project that you mentioned!

I’m developing for a mobile platform, so I need to focus on optimization
Is the maxNeighbours option a bit CPU intensive?

Yes, it would. Per the documentation page on it:

Max number of other agents to take into account.

A smaller value can reduce CPU load, a higher value can lead to better local avoidance quality.

As far as I’m aware there isn’t a way to have many many agents on screen, use RVO for them all with high quality settings (which you may need for the jittering), and keep it performant for mobile. You could look into options, for example: dramatically reducing settings for RVO or disabling it entirely for off screen units.

…Well, I’m getting ahead of myself- all I just said implies that the RVO changes actually even help with the jittering in the first place :slight_smile: Let us know if it helps.

1 Like