Hey, i am making a game and wanted to know how to do two things. #1. I wanted to know how to make little flocks of birds fly by in the sky once in a while at random? #2. I wanted to know if there is a way to make birds land on tree branches, and when you approach within a certain radius, they fly away.
If someone could assist me with this, i’d be very grateful I’m just not sure where to start.
For 2d on my most recent game, we literally just made a bird particle system that consisted of an animated bird texture, that just generated them from offscreen
To give the illusion of randomness, we had some of them fly high enough that they wouldn’t appear in the camera
Well if I had to guess, (I assume you already have a bird model you want to use), you could create some sort of script that would instanciate your little bird prefabs, hide them in discreet locations where the player couldn’t see them being generated, and just let them fly, and have them disappear after a few seconds, having them again disappear somewhere where the player can’t see.
As far as landing on branches or objects, that would be tricker, you’d probably have to animate that manually.
Perhaps someone who has done this before can comment.
You should look at tutorials for the animation tools in Unity to get an idea of how to make a landing animation. Keyframe animation lets you do the movement, and then you just need to play landing animation frames while it’s happening.
Standard scripted behavior. Collider/trigger near tree, when user steps into it, it notifies birds and they switch behavior from “sitting on the branch” to “fly away”.