- Home /
What command would I use to reset the animation so i could use the animation at will with the key press?,How do i get the animation to trigger everytime i press the key "1" and not just once
My script is pretty simple so far and its made so when the key "1" is pressed on the keyboard, a button presses down, comes back up, and ends its animation. The problem however is after stopping the loop command in unity, the animation will only play once after I press "1" and won't ever after. I'm not sure what I could add to the code to reset the animation if that makes sense. any help would be appreciated.
,I entered an animation for a button that is supposed to be pressed using the key "1" on the keyboard. I stopped the infinite loop and now once I enter play, I press 1 and the bottom will press, come up, and then do nothing for the rest of the play. I want it so I press 1, the animation happens, doesn't loop, but if i press 1 again it'll play the animation again and so forth .
Answer by KloverGames · Apr 29 at 02:06 PM
named your pictures "deth" lol... anyways set the parameters like this:
anim.Play("THIS", 0, 0f);
Your answer
