Search Unity

Resolved Cannot start an animation at the same time for 2 cloned objects

Discussion in 'Animation' started by Hexolenn, Mar 15, 2023.

  1. Hexolenn

    Hexolenn

    Joined:
    Dec 27, 2021
    Posts:
    44
    As the title said 2 have 2 cloned card object that I want to turn at the same time. But for some reason it will turn one of the cards and than the other one.The way I animated the card object is that I set a bool parameter that I turn true if I want to start its animation and sending it to a new state. But even though I turn both of the bools true at the same time for 2 diffirent cards it first animates one and than the other.

    upload_2023-3-15_9-53-31.png

    In here I first find the first cloned card object that I need to turn and than the second one. After that I sent these to an IEnumerator to wait for 0.5 seconds to wait for the card turn animation. After that I make the bool parameters both true (changing the order here doesn't change the card turned first. Even though I changed the order around it was always the first card turned that started to turn first). But for some reason the animations wont start at the same time.

    Here is the animation states if you need it.

    Ekran görüntüsü 2023-03-15 095252.png
     
  2. Hexolenn

    Hexolenn

    Joined:
    Dec 27, 2021
    Posts:
    44
    I have found the reason the animations started at diffirent times but I cant figure out why it works like that. The problem was in the transition. Even though I didnt check the "Has Exit Time" box it still uses it .

    upload_2023-3-24_11-47-44.png
    The problem was this.

    upload_2023-3-24_11-48-46.png
    And after changing it like this it started to work correctly. But I dont know why this was the problem I thought that if you dont check the "Has Exit Time" box it didnt use this to make the transitions but i guess it still uses it.