Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How do i pause an animation before they restart?

Discussion in 'Scripting' started by asiangamemaker, Sep 21, 2016.

  1. asiangamemaker

    asiangamemaker

    Joined:
    May 17, 2015
    Posts:
    25
    Hi everyone. Is there anyway to stop or pause my animation before they restart at their starting position? How can i pause my animation? I tried this myAnimation.speed=0; but none work. Any ideas?
     
  2. IsGreen

    IsGreen

    Joined:
    Jan 17, 2014
    Posts:
    206
    Set speed to 0 and modify normalized time of animation clip manually AnimationState.normalizedTime += speed * Time.deltaTime.
     
    Last edited: Sep 22, 2016