I watched the two twitch videos with Miezko talking about AI. He said that UE4 currently does not support flocking, which is okay, but I went on to read more about it and I was wondering how one might go about implementing it for a small herd of sheep. In my research I found that there are three essential rules I will want to follow:
Separation: Avoiding local flock mates.
Alignment: Steering towards average direction of the flock.
Cohesion: Steer to move towards the average position of the flock mates.
I have experience with programming and using blueprints and I was wondering what would be the best way to go about doing this? Having three functions in a sheep actor class for the three rules? Should all three of these functions be called every tick or some random time like every 1-3 seconds?
Or have collision cylinders to call separation(); a period query for Alignment() every time a sheep reaches its most recent destination; and have a Cohesion() query every random 1-3 seconds? I don’t intend on having hundreds of units using a flocking feature, just between 3 and perhaps 20.