This project was my first attempt at modeling swarming begavior in Unity and takes place on a 2D plane. The individual trinagles are boids which are governed by the principles of avoidance, alignment and cohession where they avoid colliding with neighbors, attempt to stay alligned with their neighbors and attempt to be as close to the center of their local group as they can. Put together, this is what forms the "flocks" of objects flying around the scene.
In the above simulation there are two groups that flock independently from one another. The Green Flock is below the obstacles meaning that they are able to ignor them. Meanwhile, the Blue Flock is on the same level meaning that they can collide and have to find paths around them.
Takeaways
Overall, you can watch the simulation above to see how the project worked out. I am quite happy with it and if you are interested in the code then you can access it through the GitHub link on this page. Additionally, this was the first in a 2-part series with my 3D boids project acting as the continuation of this idea.