Hello, I'm a beginner with Unity, and i want to create an animation. I'm following the tutorial "Making a flappy bird style", i'm at part 4 "animating the bird". I don't know why, i can't see the animation when using the animator in play mode. (i don't see the animation when i clik neither). this is how look my animation : and this is my animator can someone explain it to me please ? :s Thank you
No the bird on the second image is alive, not dead. The animation shows us that it has to be dead, but he won't die. :/ It's just a single frame but i have set to false the bow "has exit time". So when he dies he has to stay dead. Am i wrong ? So we should see this animation. i had try with a code, but it's the same issue. That's my code if it can be usefull : public class BirdController : MonoBehaviour { public float upForce; private bool isAlive; private Rigidbody2D rb2d; private Animator anim; void Start () { isAlive = true; anim = GetComponent<Animator>(); rb2d = GetComponent<Rigidbody2D>(); upForce = 200f; } void Update () { if (isAlive) { if (Input.GetMouseButtonDown(0)) { anim.SetTrigger("Flap"); rb2d.velocity = Vector2.zero; rb2d.AddForce(new Vector2(0, upForce)); } } } void OnCollisionEnter2D() { anim.SetTrigger("Die"); isAlive = false; } } Thank you for your response
I try the connection "any state" to "die" with condition "die", and no exit time. But nothing is showing up :s
yes it has. The tutorial says to delete the last image to have an animation who stay the same 'till the end
I don't have the blue load bar below any states in the animator when i clik on play. Maybe the issue is there ?
Sorry i made a mistake when i answered. Animations have 14frames each. I see this in the preview windows in the inspector. Moreover i notice that the animation work in this preview, but not in the game mode.