godot-steering-ai-framework
godot-steering-ai-framework copied to clipboard
Bring Separation and Cohesion into similar math
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.