4. Predator Behaviour - LariWa/BoidSimulation GitHub Wiki
To have a more realistic and dynamic environment, we decided to move the threats around. Specifically, we decided to turn them into sharks and let them swim around.
We decided to move them reusing parts of the Boid Behaviour. Our predators are no flock animals, so we removed the Boid rules of separation, cohesion and alignment. We kept the Collision Avoidance rule. This results in a predator moving fluently around. Additionally, we added a collision detection between the predator and the boid, if they are colliding the Boid is eaten, therefore we destroy it.
Video 1 - Predator Movement
We found a great shark 3D model with animations [1], We added it to the scene, and added the swimming animation using an Animation controller. Additionally, we play a bite animation, if the shark's mouth collides with a Boid. See Video 2 for results.
Video 2 - Predator Model and Animation
[1] Swimming Shark - Download Free 3D model by AIUM2 (@alfredonicolas). Accessed: May 2, 2022. [Online Video]. Available: https://sketchfab.com/models/70b107e982d44869839197124c1728b0/embed?autostart=1