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
(examples)
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!