Melee combat with dynamic animations?

Hi! I’m trying to figure out where to start at the moment, there’s so many ways to start and directions to tackle animations from that I’m unsure of how to approach my goal.

I wish to make a melee combat system where the player can attack in all directions by holding the mouse button and swiping the mouse in the direction they want to attack. (Disabling the camera while holding the mouse)

Do I make one animation for each direction and blend them with blendspace? Or should I reposition the characters arms in code using IK’s instead to allow the combat to be fully controllable through programming? (Allowing for things like directly feinting attacking by continuously tracking mouse movement for instance) How do you suggest I go about doing something like this? Where do I start?

I keep trying to just get something going, but getting stuck because I have no idea what I need.

Do yourself a favor and just make a full animation set.
it doesn’t matter if you use it or not later on, but you’ll have it, and will always be able to use it.

That aside. The choice is very personal.
I can give you this though. Forget IK on the whole thing. It’s just a hassle.
Then again you haven’t mentioned if you are wanting to build the system for melee weapons or not so it doesn’t really necessarily apply.

As far as how, I would go with a state machine to control the base movement.
Every state should allow to exit into the appropriate Parry/Block/Get Hit/Dodge state.

if you are making a complex system with 2 weapons or a shield, then you need to split the state machine (duplicate the first one with the same state changes) and decide what the shield/off hand is doing.
Then you later blend them just like a montage off the cached pose (except they get controlled by the state machine and are always applied while in combat).

Things that are hard to do well are Spear animations. Unless you want stuff to look like 300 and the horrible imitation Assassins Creed Odyssey did of that.
Really i just think the real issue is that no one actually bothers asking a master armsman for base poses… and it is also why one of the only games that manages to shine here is Kingdom Come Deliverance (after a very rough start at it - and despite the fact the rest is very sub par down to the popcorn-bag-in-microwave LODs).

Well animation is my thing and I would say the most common mistake is to focus to much on bottom up design over top down needs.

So as to questions one really needs to take into consideration are you taking a top down approach or bottom up?

From top down since UE4 is not delivered with any kind of frame work you will first need to figure out how all the nuts and bolts needs to work together that results in two players being able to interact with one another so as far as game design theory goes the first requirement is to first get the player model moving as far as it’s locomotion state goes.


As to your question where to start I would recommend that you start with locomotion state of getting your player to first move as to the basic requirements like run walk jump ect and from there layer in the combat requirements as to the action states of combat and melee. From there you have context of what to do next built on a working framework.

Thanks for the ideas, they really helped me get a bit more of a grasp of the way to go about it for my case.

I think I’ll program the gameplay logic first. (I.E, tracking mouse movement, getting the controls down, determining hits and damage, etc.) Then implement the animations.

Since I didn’t know where to start, I was kind of trying to do everything at once, which resulted in both the animations and programming being confused, messy compromises.