How do I puse an animation?
I am using animator, i have an stunn animation and stunn hit, i want to use stunn hit while stunn is waiting. more then that, I want that if he only got stunned he will get out of it at the same time that it's will take him to when he get hit while stunn. basically I want just to animate an hit while stunn without affecting the stunn time.
I tried to do it with time calculation but it didn't go well.
Set the animation speed to 0, or add a new float parameter, make you anim state use that parameter as a speed multiplier, and set the parameter value to 0.
But the speed and the speed multiplier are only get, i can't change them through the animator in code...
No, not via the animator, but through code. You can also get the normalized (0-1) time a state has been running, and use that to Play() an animation state starting at the given time (take a look at the Scriping API for the Animator.Play() function for all optional parameters that can be passed).
Answer by Decoder46 · Jul 19, 2016 at 04:03 PM
Solved my problem using the blend tree, just jumping from 0 to 2. Works good.
Your answer
Follow this Question
Related Questions
Animation clip not playing but still affecting components of other clips 0 Answers
Animator doesn't change animation in Update() function 0 Answers
Animator in child receives float from parent but animation doesn't change when condition is met. 1 Answer
Animating physics problem 1 Answer
MobController 1 Answer