godot-steering-ai-framework icon indicating copy to clipboard operation
godot-steering-ai-framework copied to clipboard

Bring Separation and Cohesion into similar math

Open Razoric480 opened this issue 4 years ago • 0 comments

Currently, putting equal parts Cohesion and Separation leads to math that vastly favours Cohesion, and requires Separation be given a decay_coefficient in the hundreds of thousands to millions range, and to give it a blended strength that is an order of magnitude stronger than the Cohesion.

Putting a 1:1 ratio of the two behaviors should cause close-to-zero amounts of acceleration, after an adjustment period, without large amounts of tweaking.

Though it should be done in a way that does not compromise the difference between Separation and Cohesion:

  • Cohesion should still be a behavior that tries to move towards the proximity's center of mass
  • Separation should still be a behavior that tries to move away from other units in the proximity, with closer units causing higher values.

Razoric480 avatar Apr 13 '20 14:04 Razoric480