Somebody help me the player animations runs at the same time (the idle/crouch and walking/crouch animation) whenever my player is idling the crouching animation plays as well as the idle animation. and whenever im walking the crouch animation is playing too
public void OnCrouching (bool isCrouching)
{
animator.SetBool(“IsCrouching”, isCrouching);
}
i think the problem is in this code please help me ASAP. Im doing this for my research
I would take out the parameters of that function.
public void OnCrouching ()
{
animator.SetBool("IsCrouching", true);
}
Since it is one line of code I would almost take it out of the function. I understand when you want it to be false it keeps it a bit simpler, but only marginally. But that is up to you. But that seems fine after that. Check your transitions. Are they all set up properly in the Animator? Also, show the rest of your script where the animations are handled so we can see where you are calling these animator functions.