- Home /
Animation parameters are not being set
I have the following animation controller with two parameters of walkingSpeed and Jump. I have the following code which should change the values of walkingSpeed and jump:
animator.SetFloat("walkingSpeed",0.9f);
animator.SetBool("Jump",true);
and animator is the correctly referenced animator object. However the values that the parameters are set to do not appear to change in the animator window, nor do they appear to impact what is happening on the screen. However they do seem to impact the values obtained when doing the following:
animator.GetFloat("walkingSpeed");
What is going on?
As a further question, how would I best go about changing the speed of an animation, in order to match the speed of a characters movement on the screen?
The animator consists of the shown blend tree, which works correctly and is always active, however due to the values not being changed it does not blends, and always acts as if the value with which it blends (walkingSpeed) is 0.
Your answer
Follow this Question
Related Questions
Play animation while button is pressed fails when using boolean parameters. 1 Answer
Chande animation speed 1 Answer
unity freezes when running sprinting animation 0 Answers
Trying to add value to a float in animator each time an animation plays. 0 Answers
The "+" icon in Parameters within the Animator is greyed out, what am I doing wrong? 2 Answers