Hi …
I’m trying to make an example as the one of 2d game.
private var anim : Animator;
function Awake ()
{
anim = transform.root.gameObject.GetComponent(Animator);
playerCtrl = transform.root.gameObject.GetComponent(PlayerController);
}
function Update ()
{
if ( Input.GetButtonDown("Fire1") )
{
anim.SetTrigger("Shoot");
}
}
but the SetTrigger dosen’t work correctly
the “Shoot” value has to back to the false in next frame , but it doesn’t
how can I fix this problem ?
please .... up
– Fadiplease mark my reply as answer if it helped
– CptBonex