School of fish

Just wanted to show you guys a simple AI for some fish. It’s really amazing what simple vector math and knowing the rules for flocking behavior can do.

ezgif-3-67efe9441808

The rules for flocking:

  • Move towards the average position of the group.
  • Align with the average heading of the group.
  • Avoid those around you.

This works for birds, people, animals, pretty any sort of crowd.

1 Like

This looks really nice…=)

1 Like

Privacy & Terms