- Home /
Animator.setBool dont trigger Animator state
I am trying the following:
Animator anim;
Awake(){ anim = getComponent(); }
void Update() { anim.setBool("running",true); }
But Mecanim is not transfering the state (it not display the right Animation state i have defined in the Animator for the Bool state). Is stays at the Idle state !?
Any suggestoins what could create this sort of BUG ?
Greetings
Teiwaz
Could we please see a screenshot of your state-diagram, also what is your transition marked as?
![alt text][1] [1]: /storage/temp/15986-botcontroller.png
The left one is the transaction from idle to run. The right one is from running into idle !
Greetings
Teiwaz
So any suggestions ? I cant be the only one running into this...
I noticed you have a second layer in your animator called "fight". By any chance is this second layer overriding the entire body rather than using an avatar mask?
Is this pseudo code?
Awake(){ anim = getComponent(); }
I think it should be replaced with:
void Awake()
{
anim = GetComponent<Animator>();
}