Implement a viewing angle on the perception radius, eg :
http://www.red3d.com/cwr/boids/images/neighborhood.gif
Don't forget to also modify the way the percetion radius is drawn on screen.
I think that to solve this, we simply need to add a check in the flock method, next to the distance < perceptionRadius checking if the absolute value of the angle between the boid's velocity and the director vector of the line between the boid and the other boid, is inferior the to the viewing angle.
Implement a viewing angle on the perception radius, eg :
http://www.red3d.com/cwr/boids/images/neighborhood.gif
Don't forget to also modify the way the percetion radius is drawn on screen.
I think that to solve this, we simply need to add a check in the flock method, next to the distance < perceptionRadius checking if the absolute value of the angle between the boid's velocity and the director vector of the line between the boid and the other boid, is inferior the to the viewing angle.