I made an animation with the animator in unity itself. I want it to “slap” when I click with the left mouse button . Problem is , the animation doesnt stop playing, even with loop deactivated . Screen : Imgur: The magic of the Internet
This is the code of the slappy script :
function Start () {
if(Input.GetMouseButton(0)) { animation.Play("slap"); }
}
Thanks .