Description of component settings. There are already two prefabs in the asset, with settings for birds and fish, you can also explore examples.
- random time of changing the behavior of flocks and objects in a flock. Set the minimum and maximum value.
- enable flock target position display.
- the number of flocks within this script.
- scatter of targets for flocks, relative to the object to which the component is attached.
Fragmented Flock Y Limit
- limit the scatter of targets along the Y axis. This is a multiplier (this value * fragmentedFlock.y).
- frequency of migration from one flock to another, from 0 to 1. The higher the value, the more often the migration.
Pos Change Frequency
- frequency of change position of target for flock, from 0 to 1. The larger the value, the more often the position changes.
Smooth Ch Frequency
- smoothing the change in position of the target for flock. This is necessary so that there is no sharp change in the direction of movement of the flock.
- prefab object that will be in a flock.
- the number of objects in total in all flocks.
- the speed of objects in flocks, this value is multiplied by the random speed of a particular object (from 3 to 7).
- scatter of objects inside the flock.
Fragmented Birds Y Limit
- limit the scatter of objects within the flock along the Y axis. This is a multiplier (this value * fragmentedBirds.y).
- soaring object. The lower the value, the more soaring. For sharp turns, increase the value.
- swinging an object along the Y axis.
- enables the restriction of rotation of the object along the X axis. Prevents a strong turn up or down. This option imposes certain costs on performance.
Rotation Clamp Value
- value of the rotation angle limit up and down.
- local random size of the object in the flock. Set the minimum and maximum value.
- enable danger detection. Also, one collider is turned on, for the hunter to detect flocks. Danger is determined by one script, for one flock. See the "Fish Boids Danger" example.
- radius of danger detection.
- change in the speed of objects in a flock when danger is detected. This is a multiplier (this value * birdSpeed).
- change in the soaring of objects when danger is detected. This is a multiplier (this value * soaring).
- LayerMask of the object being the danger.