So I’m not sure if this is a bug or compilation issue or what. But I just added an animation to my player model which is controlled by a boolean in Mechanim. Said boolean is changed through the script when the “LeftShift” key is down. If it’s down it returns true, otherwise false. Simple enough, and the transition for the animation between running, idle and walking is based off this bool. The code is simple within my update in C sharp.
if (Input.GetKeyDown(KeyCode.LeftShift))
{
Debug.Log("We're Running");
AliAnimations.SetBool("Running", true);
}
else
{
Debug.Log("We're NOT Running");
AliAnimations.SetBool("Running", false);
}
But for some reason this acts like it’s only working once as if it’s a single frame rather than a constant update despite being in the update function. Meaning, as soon as I hit play it will say “We’re NOT Running” as it’s supposed to, but only once. Then when I press my key it does the running one only once as well and doesn’t transition anymore after that. Am I missing something simple? Or is this some kind of odd bug or issue with the update? Or am I just plain derp and not thinking clearly right meow?