Hi
I’m creating a combat system for my game, and I’m having some trouble. I’m using the included ThirdPersonController and modified the AnimatorController. The animatons are from The Mixamo pack Sword and Shield.
When I hit “Fire1” (left mouse button) I call animator.SetTrigger(“Attack”).
The attack animation transitions from the any state. Usually this works quite well, but sometimes it just doesn’t trigger and I have to click a couple of times before the attack animation is triggered. I’ve also tried just calling animator.Play(“attack_anim”). If I mash the buttons the attack is triggered normally.
Any hints?
I just remembered that I haven’t verified this outside of the editor, so it might be that this works better in a standalone build.
By the way. As far as I’ve heard the normal way is to transition from locomotion → attack, and use “Any” for death animations and such. I might change this, but at the moment I just want to ensure that attacks doesn’t feel sluggish.