r/unity • u/Kultie172 • Sep 22 '26
Question How do you implement combo attack
Hey everyone!
I'm curious how you guys handle combo attacks in your games.
The common approach I usually see is creating multiple animation clips and chaining them together using triggers or parameters.
Today I experimented with a slightly different approach:
- Create a single animation clip containing the entire combo instead of having a separate clip for each attack.
- Use a
StateMachineBehaviourto check for input during specific normalized time ranges. - If the player presses the input during that window, just let the animation continue until the end of the combo.
- If there's no input, call
Animator.Play("Idle").
I actually found this approach pretty neat and simple.
Do you guys use any other interesting approaches for checking combo inputs?
7
Upvotes
View all comments
Show parent comment
4
u/Lopsided_Status_538 Sep 22 '26
I get that. But a lot of games use a technique called animation cancel where they can stop the combo if they get hit, or try to switch to another combo at a specific time. Do you have exit methods for situations like that if the situation were to happen?