GDQuest / godot-steering-ai-framework

A complete framework for Godot to create beautiful and complex AI motion. Works both in 2D and in 3D.
http://gdquest.com/docs/godot-steering-ai-framework
MIT License
1.17k stars 81 forks source link

Bring Separation and Cohesion into similar math #42

Open Razoric480 opened 4 years ago

Razoric480 commented 4 years ago

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: