How do I adjust the speed of an animation at run-time like in world of warcraft? In wow when you get more haste or faster weapon. You swing faster how do I do that?
1 Answer
1Hi @tonydinendash,
There are several way however the easiest in my opinion is by defining a new float parameter in your animator “AttackFreq” and set it’s value to 1/AttackSpeed whenever your attack speed changes.
Then you just have to activate in the animator on your attack animation the box the speed multiplier and set it to your Attack Frequency

An other way would be to add this in an Update function (tho it is less performant)
if( animator.GetCurrentAnimatorStateInfo(Layer).IsName("yourAttackAnimation"))
{
animator.speed = animSpeed;
}