Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
included "mecanim" in tags, removed irrelevant tags, deleted additional question
Source Link
Seth Battin
  • 5.5k
  • 3
  • 29
  • 43

I have the following animation controller:

enter image description here

with two parameters of walkingSpeedwalkingSpeed and JumpJump. I have the following code which should change the values of walkingSpeed and jump:

animator.SetFloat("walkingSpeed",0.9f); 
animator.SetBool("Jump",true); 

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?

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)walkingSpeed is 0).

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 movementWhat is going on the screen?

I have the following animation controller:

enter image description here

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?

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.

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?

I have the following animation controller:

enter image description here

with two parameters of walkingSpeed and Jump. I have the following code which should change the values:

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");

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).

What is going on?

included "mecanim" in tags, removed irrelevant tags, separated out additional question
Source Link

I have the following animation controller:

enter image description here

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?animator.GetFloat("walkingSpeed");

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 movementWhat is going 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.

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?

I have the following animation controller:

enter image description here

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.

I have the following animation controller:

enter image description here

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?

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.

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?

Source Link

Unity-Animation parameters are not being set

I have the following animation controller:

enter image description here

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.