6. Independent Swarms - LariWa/BoidSimulation GitHub Wiki

In order to have multiple kinds of fishes swim around in a realistic manner, we decided to implement independent swarms. With the given implementation only one swarm is possible. Therefore, we added some logic to be able to create multiple swarms. Each swarm will avoid colliding with boids from the other swarm and the behaviour rules of the boids are only applied using the positions of the boids of the swarm the boid belongs to. See the Figure below for the result.

Figure 1 - Independent Swarms

⚠️ **GitHub.com Fallback** ⚠️