Directional / Procedural Melee Animations

I’m fairly new to Unity and game development and am running into another issue and could really use some help.

I have a ‘full body awareness’ FPS character controller for a game im working on. I actually have the head stabilized and basic locomotion and animations working well.

My newest issue is implementing melee combat.

I want it to work similar to DayZ where if I’m unarmed and hold right click to be ready to attack, when I look up or down, you will be able to see the hands / arms moving up and down with the player look direction.

When the player punches or hits, the hit should go the look direction.

I actually made my own animations that seemed to look pretty good, however I found out very quickly you are animating very specifically to one direction / motion.

One idea i’ve had so far is adding shoulder rotation based on the players vertical look direction. I was just having a hard time actually implementing that. In theory, rotating the shoulders seemed to align the guard position properly (ready to attack position) however, im not sure if the punch would play correctly.

Anyone have any ides for this? I’ll take it one problem at a time but was hoping if I could get the shoulder adjustment done right this solution would work for both 2H and 1H weapons as well, but I may need a custom solution for each.

It sounds like IK might be what you need.

Most definitely. I should’ve added I do have final IK to help out with that too.

Hoping to get some ideas to try and/or someone who has dealt with this or something similar before.

Among the demos of FinalIK, there is one called FinalIK/_DEMOS/FBBIK/Boxing which might inspire you.

Holy shit this demo scene is EXACTLY what I am trying to do. Thank you!!!