Home > Blockchain >  How to increase animation play speed through Animator without repeating the animation in Unity
How to increase animation play speed through Animator without repeating the animation in Unity

Time:12-23

First of all I'm trying to start an animation one time per 10 seconds. So I setted transition duration to 10 seconds and it worked. The animation was run only one time in 10 seconds.

But also the animation was playing too slow like in slow motion, so I tried to increase the speed in three times through the animation controller. After it my animation increased speed, but also started to repeat three times instead of one.

So how can I increase the speed without repeating the animation?

Details:

The red circle is the animation I wanted to run in 10 seconds and increase the speed: enter image description here

trap_idle0 to trap_idle1 transition: enter image description here

the trap_idle1 settings: enter image description here

the trap_idle1 to trap_idle0 transition: enter image description here

CodePudding user response:

your problem here is that you try to play an animation every 10 seconds. You should consider doing this via script rather than with the weird animator transition loop you are trying to implement because this way you won't get through.

Try a Coroutine with a WaitForSeconds(10) or a time calculation with nextPlayTime = Time.time 10 ?

Hope that helped

  • Related