Please follow previous section, Basic Workflow, to setup a basic flock first.
snapshot of what a seeking flock may looks like, target is shown by
translating tool gizmo
Leading a flock to a target is easily achieved by adding a Steer Behavior.
One can achieve this by :
The Steer Behavior should looks like the following image:
Steer Behavior configured to reach a target, with constant weight
The process is identical for fleeing, except that Steer Behavior Steer Mode must be set to "Flee".
By default, the target will attract/flee boids from any distance at its maximum weight (1.0).
Weights control :
To have an absolute target weight other than one, just move Weight At Max Distance value from 1.0 to less. As Max distance is 0, this value will be used for all boids (see below).
To see how weights and forces are mixed to move a boid, see Steer Behavior reference guide.
Min/Max Distance and weights of Steer Behavior allow to define several distance intervals :
Considering this
Here is a quick overview of weights impact :
Default SteerBehavior parameters
Same frame, with Steer Behavior Min Distance set to 40.
We can improve the natural effect by also increasing the separation of flock, in the Flock Locator. Let's set separation weight to 20 instead of its default 12 value :
Same frame, with a Min Distance of 40 and a Flock Locator separation
weight of 20