Swinging melee while moving

Hey,

I’ve got a good combat system set up. Now I want to enable the player to charge his attack while moving, i.e move the weapon out of view and charge the attack. I’ll do this by running an animation on the Press of the attack input; I’m guessing that’s the right way to do this?

If the player is running and he releases an attack, how would I make the character keep on running while doing the animation? I.e just move his arms to swing the blade. Would I need root motion?

from the sound of it you would need layered blend per bone.

unreal doc

a tutorial that is on the subject if i remember right.

If you are using montages for the attacks then this video should have the info you need. It’s a bit out of date but you should be fine.

If you are doing it with animations and your state machine then you should blend the attack animations with the locomotion blendspace using the “layered blend per bone” node (as suggested). You may also want to use a “blend by bool” node so you can turn the layered blend on when attacking and off when the attack is finished (depending on how your anim BP is set up).

Hopefully you’re using montages. It’ll be a bit easier to deal with.