Boids System

While working as an intern at a VR startup, I was tasked with creating an AI to simulate fish swimming underwater. Given that it was for a VR experience, performance was extremely important
I began by following a tutorial on Flock AI from Shinao on Github (https://github.com/Shinao/Unity-GPU-Boids), utilizing a simpler version of his approach, which was more optimized for VR and allowed the fish to swim in smaller schools, with more detail and “wiggling” to give the appearance of swimming. In the end, this is what we ended up with. In this clip (the only i’m allowed to post at this time) you can see a handful of schools procedural swimming around and minding their own business. The full version of the code also allows them to follow predefined paths with slight variations to still look natural. All in all, very fun and educational project