❔ Stop animation (if and else)
I made this code and I have a walk animation when I press "W", but I don't know a code to stop the animation if the "W" key it's not being pressed. I have tried many ways, but couldn't find one that works.
7 Replies
this provides basically 0 actual context needed to answer the question
but if I just go crazy with assumptions
is there a
.RemoveTrigger()
method?
or .SetTrigger("IsNotWalking")
?not in this script
well
what is
.SetTrigger()
then?I mean that I don't have a "IsNotWalking" one
I'm still new to code, so I'm watching the unity code free course
well, then I gotta recommend you keep following that
if you've already deviated from that, then I reiterate: what is .SetTrigger()?
There is ResetTrigger if this is the Unity Animator
close enough to RemoveTrigger 😄
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.