Need some suggestions for making flying bird AI ?

well i want to make a flying bird AI for a shooting game . but can’t find the good way to set it perfectly . i have a character who can target with a rifle for shoot the flying birds on sky . the suggestion is how can i make the birds can attack to the player (random) . and birds want to fly around in the sky with limited area which was set with sphere collider .and how to make a fall down to the ground event as a riged body physic when the player shoot the birds . and another one is those birds can stole something from the scene for example : on the scene there have some Grapes , if player can’t shoot the birds untill birds get the Grapes . the game is over . it’s a 3d game ! waiting for someones respond .

I recommend reading a book about AI.

“Artificial Intelligence for games” Second Edition Ian Millington, is my fav, but of course, I did not read them all.

There are real good, easy to understand, implementations for such behaviors in pseudo code. Complete with why this, why that, complexity, etc.

What you look for is flocking and swarming with/or some other steering behaviours like wandering (if it is not a swarm).

For you special scenario, there is also a lot of custom scripting involved, like the landing, attacking, steeling. But implementing the basic steering behaviors will make that easier too, because you can just say i.e. “arrive at point” and it will fly there for an atacking move or something. Then the bird uses “flee” followed by “wandering” or “swarm flocking” again.

Best of luck! Getting things like this running is much fun. Make the basic steering behaviors as reuseable as possible and you will profit from your work for a long time.

the simple way is to use can create the path at runtime and this way may be more real or you can set up fixed path for bird to fly.

For the flying part you can look at the bootcamp demo it has a crow ai where the crow
just flies in the sky.

For the landing part you have to have an animation for that and you probably need to calculate the height of the bird, or have a sort of script that checks if the bird is on the ground it will stop the fly down animation and start the attack animation.

Try it with this

Hope this will help a little for you to understand on how to do this