i watched your Tutorial looking for an answer to my issues which is When i walk to the right the walking animation works but when i start walking to the left my character goes back to Idle. any idea why would that happen mate ? if (moveInput > 0.01) { animator.SetBool("Walking", true); } else if (moveInput < 0.01) { animator.SetBool("Walking", false);
If(moveInput > 0) { Animator. SetBool("Walking", true); } else if(moveInput < 0) { Animator.SetBool("Walking", true); } else { Animator.SetBool("Walking", false); } That's because the horizontal input is going towards -1, when going left, and 1 when going right, and its 0 when you are not moving. I hope it works
@@EmilioBlacksmith Thank you for the answer but its not working ( error CS0120: An object reference is required for the non-static field, method, or property 'Animator.SetBool(string, bool)' ) without the else statement the character will stay in walking animation all the time and never go back to idle ofcource. I'm running out of ideas honestly.
oooo very nice
Is there a faster way to scale the animations instead of manually adjusting them? What happened to the Sampler?
It really help me! Thanks!
Hello , can someone help me :( wath do i need to put in UI Keyboard and UI Gamepad and Character holder? pls?
i fix it!!
i watched your Tutorial looking for an answer to my issues which is When i walk to the right the walking animation works but when i start walking to the left my character goes back to Idle. any idea why would that happen mate ?
if (moveInput > 0.01)
{
animator.SetBool("Walking", true);
}
else if (moveInput < 0.01)
{
animator.SetBool("Walking", false);
If(moveInput > 0)
{
Animator. SetBool("Walking", true);
}
else if(moveInput < 0)
{
Animator.SetBool("Walking", true);
}
else
{
Animator.SetBool("Walking", false);
}
That's because the horizontal input is going towards -1, when going left, and 1 when going right, and its 0 when you are not moving.
I hope it works
@@EmilioBlacksmith Thank you for the answer but its not working
( error CS0120: An object reference is required for the non-static field, method, or property 'Animator.SetBool(string, bool)' )
without the else statement the character will stay in walking animation all the time and never go back to idle ofcource. I'm running out of ideas honestly.
@@EnemyOTS Awww sorry, change it to animator, with lowercase a, because its searching for the animator component inside the object. animator.SetBool
@@EmilioBlacksmith you are a genius! worked like a charm. thank you so much.
@@EnemyOTS no problem mate, I'm here to help