Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Animator: Reverse animation is played from the end

Discussion in 'Animation' started by kecsius35, Dec 1, 2023.

  1. kecsius35

    kecsius35

    Joined:
    Jan 29, 2023
    Posts:
    1
    I have a problem with Animator. I had a strange delay that depended on the waiting time for the end of the animation.
    I was able to fix this by using normalized time. But now the reverse animation starts not from the current state, but from the end.

    Here's the code:
    Code (CSharp):
    1. public void SettingsAnim()
    2. {
    3.  
    4.     options.SetFloat("Process", 1);
    5.     options.Play("SettingsAnum", 0, 0);
    6. }
    7. public void SettingsAnimOff()
    8. {
    9.     options.SetFloat("Process", -1f);
    10.     options.Play("SettingsAnum", 0, 1);
    11.  
    12.  
    13. }
    And here's the video:


    I would appreciate your help.