I have animated a gun on blender, imported it into unity and wrote a simple script which plays it when the LMB is clicked. But when I do click the LMB it only plays half the animation, I had this problem before but I fixed it by having the animation loop which I cannot do this time because its a pistol. Can anyone help me with this?
This is the script im using;
function Start () {
animation[“shoot”].speed = 1.8;
}
function Update () {
if(Input.GetButtonDown(“Fire1”)){
animation.Play(“shoot”);
}
}