I'm developing a simple "Geometry Wars" like game: 2D world and multiple enemy spaceships. The enemies should be able to pursue the player and avoid collisions between them at the same time. I've implemented a vector field algorithm based on this one. When two ships are too near between them, a force that slightly modifies the direction of the ship is created.
This works like a charm, the enemies pursue the player and no collision exits, but this happens sometimes:
This is because in one frame they "collide" and the path is modified, but, in the next frame they are not colliding and the path is not altered. This two states in loop cause that shaking.
Do you have any idea to solve this?
PS: if I didn't make myself clear, please ask me, english is not my first language