Advaced 8 directions combat animation systems. Parking animation

Hi, I work as game animator and I’m trying to build a prototype of combat game to demonstrate animations in actual work

(some samples of my animation)

and some more attacks here

punch11 - YouTube

Could you advise any guide how to build melee-combat logic setup? (I’ll try to express the details below)

So, I’ve made some research, there are a lot of materials on the internet about how to make a combat system with different attacks and combos using blendtree or montage play with combo counter logic and pose blending
Unreal Engine 4 - Adding Animations - Combo Attacks/Attacking (Part 28) - YouTube
- YouTube
and others

However, these examples are limited by the simplest combat model where you can make a hit straight ahead only.

But in real games things are much more complicated, you can attack in any direction in different forms targeting enemies one after another, changing priority depending on what you’re looking at and what enemy is the nearest (like in the Witcher 3 for instance).

If you simply rotate the character it would produce huge slipping of the legs.

So, my first thought was making 8 different-directed animations and using a blendspace, same approach is good for walk/strafe animations, but there are some issues here. First, if the angle is kind between 0 and 45 degrees - animation will mess up. Second, the animation direction should be not “where we’re looking at” but calculated for each enemy individually. For example, we can look forward, but character will hit enemy behind, in case if there are no enemies in front of him.

I asked one game developer, and he said that such things very much depend on game design and blendspace is not acceptable here because of blend issues, but in general how it should work:

  • define the direction to the proper enemy (how???)
  • choose the closest animation to this direction (how???)
  • adjust position and rotation of the character according to this direction (how???)

This approach should provide good results with tiny leg slipping and seems to be called “parking animation”, but there are no results in google for it.

Now I have 6 different animations for straight ahead attack switching by combo counter and I don’t know to combine it with 45, 90, 135 and 180 degree animations without making all system super messy.

I’m really struggling to try to find any materials about this, could you share any thoughts, any idea how to develop such system? Perhaps you could suggest at least how to google it properly. Thank you!

First, instead of making a mess with this theory of Parking animations, look into turn in place.

You can combine the top portion of the animation to the bottom of a turn in place (animated specifically for the combat stance(es) ) and achieve a good looking yet almost fully dynamic animation (in reality it’s not dynamic at all).

2nd, animation curves.
Much like for turn in place, you can rotate the spine via code do adjust your attack point entry a little more.

Picture it this way. The target is to your right by 90ged.
Adjust overall rotation with a step, start attack
you will be lined up exactly if your turn in place accounts for 90deg.

Now, target is to the right by 48deg.
Turn in place kicks in, and you end up closer to the target, but still off.
Spine twist kicks in, and adjust for that (90-48 deg) difference. Delivering the attack correctly. At a minimal twisting cost (NB, if your armor plate twists that’s a bad thing. Armor plate usually has a full 1 for weight paint associated with a specific bone only. You may have to adjust drastically to get this done right).

Ik directionals.
Like for anything else, you can get IK to direct the animation’s swing on target. Since it automatically corrects the animation based on restrains, this gives the most dynamic and yet customizable result.
When paired to the rest particularly.