How to play attack animation multiple times with mechanim
Heya.
I have an attack animation within mechanim which is triggered by a KeyDown and a trigger parameter in the animator. The Attack animation uses an animation event to fire the bullet projectile at the right moment in the animation.
Now. I want the player to be able to fire in quick succession (every 0,1 second or so). The problem is that the character needs to wait for the event to occur before another shot is fired, and therefore the attack speed is sorta fixed.
How can I, after the first shot is fired, jump to the animation event within mechanim, so the attack animation does not need to play from the beginning?
Thanks in advance.
I'm just gonna bump this since when my question got moderated after 18 hours it ended up a page 2 instantly.
If the question is confusing, please do tell.
yes.your question is bit confusing.can you explain in another way?
Yeah, sure.
I use mecanim to control my animations. One of these are the character's Attack animation. When I order my character to shoot (Attack) he will play his shoot animation once as he is supposed to. I have set up an event in the Attack animation, so the projectile he uses for ammunition, is spawned at the right moment in the animation.
All the above works fine. However I would like to be able to rapidly click the fire button and make him fire on each click without playing the whole of the Attack animation over. As it is right now. He will play the animation and needs to finish it before he will shoot a second, third, fourth and so on, times.
I was thinking I need to be able to jump to the event in the animation in order to make him shoot faster. Speeding up the animation seem does not seem as the right solution here. But correct me if I'm wrong.
Hope this clarifies a bit.
Your answer
Follow this Question
Related Questions
How do/should I make my character jump? 1 Answer
Add Event in animation from another Gameobject 5 Answers
Animator not been initialized please help 0 Answers
How to add Animation Events in the Timeline editor? 5 Answers
"Motion Blur" for 3D attack animation, like in Blazblue, Breath of the Wild, Etc. 0 Answers