Agents can also organize in flocks. The following properties affect flocking behavior.
- flocking {boolean} default: false
- desiredSeparation {number} default: width * 2
- separateStrength {number} default: 0.3
- alignStrength {number} default: 0.2
- cohesionStrength {number} default: 0.1
In the example below, we create 20 Agents and set their 'seekTarget' to the Walker. We also set 'flocking' to true to enable the flocking behavior.