- Home /
Question by
IamTabu316 · Jun 12, 2017 at 08:46 AM ·
c#animation
Sword is Messed Up
I added a sword to my player and the animation is very simple. The part of the code says no errors but when I play the game the sword just flashes. (Using C-Sharp script)`if (anim.GetBool ("Sword")) anim.SetBool ("Sword", false);
if (Input.GetKey (KeyCode.L))
{
anim.SetBool ("Sword", true);
}`
Comment
Best Answer
Answer by numberkruncher · Jun 17, 2017 at 10:59 PM
Try using Input.GetKeyDown(KeyCode.L)
and anim.SetTrigger
instead.