Flocking behaviour in particles
10th April 2008
Among the new actions added in version 1.0 are three that cause interaction between particles. These are
ApproachNeighbours which causes nearby particles to move towards each other.
MinimumDistance which causes particles to keep a minimum distance between themselves.
MatchVelocity which causes particles to adjust their velocity to match the average of all near neighbours.
By combining these actions, we can create flocking behaviour, where particles approach each other, but not too close, and match the velocity of the particles around them. A simple example looks like this.
Flash required: You need version 9 or later of the free Flash player from Adobe to use this content. To download and install the free player from Adobe’s web site click here.