Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Exit Time of 1, but animation exits before finishing (full example included)

Discussion in 'Animation' started by dCoding, Apr 16, 2015.

  1. dCoding

    dCoding

    Joined:
    Sep 9, 2014
    Posts:
    26
    As a simple example, I did the following steps in a new project in Unity 5.0.0f4:

    1. Create a cube.
    2. Create an Animation called "TestAnimation".
    3. Drag "TestAnimation" onto the cube - this will create an AnimatorController called "Cube".
    4. On "TestAnimation", record the cube scaling from 1,1,1 at 0:00, to 2,2,2 at 0:30 (just the 2 keys).
    In the Animator, do the following:
    5.1. Add an empty "New State" to Cube.
    5.2. Turn off "Write Defaults" in "TestAnimation" and "New State".
    5.3. Add a transition from "TestAnimation" to "New State".
    5.4. On the transition, change Exit Time to 1, and Transition Duration to 0.

    [Note - if you don't want to do all that then I have attached an example project.]

    When you hit Play, you should see the Cube scale up - but it will never be 2,2,2. Each time you Play, the result will be slightly different, it might be 1.969842,1.969842,1.969842 or 1.974897,1.974897,1.974897.

    I would like to know why, with an Exit Time of 1, does the animation exit before actually finishing (i.e. the scale reaching 2,2,2)?

    As a workaround, you can increase Exit Time to something like 1.1, and the cube finishes scaling, but it doesn't feel right to do this as any amount over 1.0 is intended to start repeating the animation (when loop is enabled). Interestingly, I can even set Exit Time as high as 1.04, and it still exits too early.

    Any insight would be much appreciated!
     

    Attached Files:

    Last edited: Apr 23, 2015
  2. dCoding

    dCoding

    Joined:
    Sep 9, 2014
    Posts:
    26
    No ideas anybody? Is this a bug in Unity or am I doing something wrong? Please help if you can.
     
  3. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,672
    Hi dCoding,

    You are right that sound like a bug, the animation should be played up to 100% in this case.
    please log a bug with your project.
     
  4. dCoding

    dCoding

    Joined:
    Sep 9, 2014
    Posts:
    26
    Thanks Mecanim.Dev, I have now submitted this as a bug report.
     
  5. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,672
    Thx, send me your case number when you get it for the follow up.
     
  6. dCoding

    dCoding

    Joined:
    Sep 9, 2014
    Posts:
    26
    Sure - the case number is 691710.
     
  7. dCoding

    dCoding

    Joined:
    Sep 9, 2014
    Posts:
    26
    A quick update - I've tried the same example project on the just released Unity 5.0.2f1, with the same results.

    Hoping this will get looked into at some point!
     
  8. Mecanim-Dev

    Mecanim-Dev

    Unity Technologies

    Joined:
    Nov 26, 2012
    Posts:
    1,672
    Hi dCoding,

    We are looking at this issue right now and we hope to provide a fix in 5.2, if the fix is simple enough we will backport to a previous version like 5.1 or 5.0.
     
    theANMATOR2b likes this.
  9. dCoding

    dCoding

    Joined:
    Sep 9, 2014
    Posts:
    26
    That's fantastic - thanks for the update.
     
  10. RaymondEllis

    RaymondEllis

    Joined:
    Jul 15, 2015
    Posts:
    3
    Any news on the fix?
     
  11. Meatloaf4

    Meatloaf4

    Joined:
    Jul 30, 2013
    Posts:
    77
    Still having this issues as of 5.3.0f4 has this bug been fixed yet?
     
  12. Razouille

    Razouille

    Joined:
    Jan 25, 2013
    Posts:
    40
    Any news about it ? I got similar issue with "Exit Time" sets to 1, sometines it keeps the last frame of animation few frames before doing the transition.
     
  13. getwilde

    getwilde

    Joined:
    May 4, 2016
    Posts:
    18
    I'm pretty sure I'm seeing this occur in Unity 2017.1.0f3, too.

    EDIT: It looks like others have run into the same issue (where the last frame isn't always played before transition occurs).
     
    Last edited: Aug 12, 2017
  14. vizgl

    vizgl

    Joined:
    Nov 4, 2014
    Posts:
    34
    2019.1.9f1 got this issue too
     
    kayroice likes this.
  15. unity_7Lz4W5sqYvPmBw

    unity_7Lz4W5sqYvPmBw

    Joined:
    Nov 23, 2017
    Posts:
    1
    I'm still having this bug with Unity 2019.2.9f1 and it's really annoying.. If it's not going to be fixed, is there at least a workaround ?
     
  16. AdrienMgm

    AdrienMgm

    Joined:
    Oct 10, 2017
    Posts:
    3
    2020 and still an issue?
     
  17. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    1,146
    Anyone still struggling with this issue might be interested in Animancer (link in my signature) which does not have the same problem. One of my unit tests verifies that using End Events to play another animation will properly apply the last frame of the previous animation first.
     
unityunity