Unity-Animation parameters are not being set
Posted
by
user1814893
on Game Development
See other posts from Game Development
or by user1814893
Published on 2014-05-21T01:19:07Z
Indexed on
2014/08/24
4:34 UTC
Read the original article
Hit count: 326
I have the following animation controller:
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?
© Game Development or respective owner