We often encounter a situation where combat animations are the most labor-intensive part of the pipeline. Not because it's technically harder, but because the requirements are fuzzy until the game prototype is running. "Make a good sword swing" turns into five iterations when the game designer finally sees how the animation interacts with the hitbox, hitlag, cancel window, and combo system. Proper structure from the start saves up to 40% of rework time and cuts the number of iterations in half.
Phases of a Combat Animation
A combat strike in a game consists of three phases: anticipation (wind-up), active (the hitbox phase), and recovery (exiting the animation). The animator must know the length of each phase in frames — it's not an artistic decision, it's a game design specification. Without it, the animation will look beautiful but be non-functional: the hitbox will activate before the weapon visually reaches the target, or the player will get stuck in recovery and be unable to cancel the attack.
In Unity, these phases are controlled via Animation Events. At the required frames, events are placed: OnAttackStart, OnAttackEnd, OnHitboxEnable, OnHitboxDisable. A Combat Controller script subscribes to these events and manages the weapon colliders. This is the standard scheme; without it, hit detection either relies on C# timers (which break when the animation changes) or on physics triggers (which cause false positives). More details: Animation Events.
The cancel window is the moment when the player can interrupt the current attack and start the next one. In the Animator Controller, this is implemented via a Transition with the condition canCancel == true, set by an Animation Event at the required frame of the animation. If the cancel window doesn't match the feel of the gameplay — it's back to the animator, not the programmer.
Motion Capture vs. Hand-Keyed Animation
For unique animations (deaths, finishers, cutscenes), the choice of pipeline depends on budget and style. Motion Capture provides organic movement that is extremely difficult to reproduce manually — inertia, subtle weight shifts, micro hand movements. The downside is that raw mocap data requires retargeting and cleanup: jitter, joint artifacts, and mismatches with the game character's proportions.
Hand-keyed animation in Maya or Blender is slower but gives full control over timing and spacing. For stylized games with exaggerated movements, it's often preferable. Hand-keyed takes 3-5 times longer than processing mocap but eliminates retargeting artifacts. Workflow: blockout using Bezier curves, then refinement with breakdown keys, and final tweaking of Euler Rotation to avoid gimbal lock.
Gimbal lock in Maya is a common problem when animating rotations over 180°. It is Fixed by changing the Rotation Order to ZXY or XZY depending on the main rotation axis of the bone. For wrists during pronation, this is mandatory; otherwise, the Euler curves will flip. Certified specialists on our team know these nuances and guarantee no artifacts.
How to Implement a Combo System in the Animator Controller?
A three-strike combo is implemented step by step:
- Create a Sub-State Machine with three states: Attack1, Attack2, Attack3.
- Set up a parameter
NextAttackof type Trigger. - In each state, on the cancel window frame, call
animator.SetTrigger("NextAttack")via an Animation Event. - Set up transitions: Attack1 → Attack2, Attack2 → Attack3, Attack3 → Idle. The transition condition is
NextAttack. - After the third strike, return to Idle or Run via the Exit.
An alternative is an Animation Layer with Override and its own State Machine for attacks on top of the base locomotion layer. This is convenient if attacks must work while moving, but requires a proper Avatar Mask: only the upper body plus weapon, while the lower limbs continue locomotion.
Blend Trees for attacks with weighted interpolation are used less often — only for animations that depend on direction (attack left/right), where a 2D Blend Tree interpolates between four attack directions.
What Typical Mistakes Are Made When Creating Combat Animations?
- Animation without Export Root Motion. If the strike includes a lunge forward, Root Motion must be explicitly set; otherwise, the character teleports back to the start when transitioning to Idle.
- Lack of an Additive Layer for hit reaction. Hit Reaction is layered on top of any state via an Additive Layer — it doesn't interrupt the attack but provides visual feedback. Without this layer, you'd need separate versions of every animation with reaction.
- Ignoring Secondary Motion. Capes, hair, loose clothing — without secondary motion, the animation looks "wooden" regardless of the quality of the main keyframing. In Unity, this is handled via Physics Bone through Animation Rigging or Spring Bone from the VRM pipeline.
Comparison of Animation Approaches: Mocap vs. Hand-Keyed
| Characteristic | Motion Capture | Hand-keyed |
|---|---|---|
| Creation time (per 10 seconds of animation) | 2-4 days after processing | 10-20 days |
| Control over timing | Limited (requires cleanup) | Full |
| Artifacts (gimbal lock, jitter) | Often present | Minimal |
| Ideal for | Realistic games | Stylized games |
What Is Included in the Work on Creating Combat Animations
- Developing animation structure (phases, events)
- Creating source animations in Maya/Blender (mocap or hand-keyed)
- Integration into Unity/Unreal Engine with Animation Events setup
- Configuring the Animator Controller (transitions, cancel windows, combos)
- Adding Secondary Motion (Physics Bone, Spring Bone)
- Testing in the game prototype and adjustments based on feedback
- Final package: FBX, configs, event documentation
- Post-delivery support (2 weeks)
Setting Up Export Root Motion
For correct Export Root Motion in Unity, in the model settings set Root Transform Position (Y) and Root Transform Rotation to None, and Root Transform Position (XZ) to Bake Into Pose. Otherwise, the character will shift with each strike. Detailed documentation at Root Motion.
Process and Timelines
| Type of Work | Estimated Timeline |
|---|---|
| Single standard strike (3 phases, Animation Events) | from 4 to 8 hours |
| Combo of 3 attacks with Animator integration | from 1 to 2 days |
| Full combat set (strikes, block, dodge, death) | from 5 to 10 days |
| Unique cutscene (15–30 seconds) | from 3 to 7 days |
Cost is determined after discussing the number of animations, complexity of the combo system, and Secondary Motion requirements. If you need such a package, get a consultation from our specialists — we guarantee a professional approach and adherence to deadlines. Contact us to discuss your project.





