ok so if ConsumeConsumable is true how do i play the animation RigtHandConsume_consumable_01?
public Animator HandsAnimator;
public void ConsumeConsumable()
{
HandsAnimator.SetBool(“ConsumeConsumable”, true);
setToFalse = true;
}
ok so if ConsumeConsumable is true how do i play the animation RigtHandConsume_consumable_01?
public Animator HandsAnimator;
public void ConsumeConsumable()
{
HandsAnimator.SetBool(“ConsumeConsumable”, true);
setToFalse = true;
}
try this:
public Animator HandsAnimator;
public void Update()
{
HandsAnimator.SetBool(“ConsumeConsumable”,Input.GetKeyDown(KeyCode.C));
}
It will play an animation because the bool is true.But make sure you set transitions correct.For example from idle you uncheck exit time and set to transition if “ConsumeConsumable” is true.But from ConsumeConsumable animation to idle you must check exit time otherwise it won’t play.I hope it works.
Sounds like you could benefit from watching this: https://unity3d.com/learn/tutorials/modules/beginner/animation/animator-scripting