ricardojmendez / UnitySteer

Steering, obstacle avoidance and path following behaviors for the Unity Game Engine
https://numergent.com/tags/unitysteer/
Other
1.21k stars 277 forks source link

Add min/max cohesion contribution for more controllable flocking #50

Open sinbad opened 7 years ago

sinbad commented 7 years ago

I found adding a min/max limit for the cohesion component helped make flocking behaviour more controllable.

I set mine to 0.2 and 0.5 respectively, which I find helps avoid over-clustering close up (less reliance on separation to balance out) and keeps vague tracking within the group right up to the edge of the neighbour range instead of it falling off before that. Default is 0/1 though which is no change on previous behaviour.