How do games like Mordhau, Chivalry 2 and Criminality achieve their procedural weapon animation swings

To give some background as to why I answer this question, I would like to make a combat focused hack and slash. I have no idea where to start when it comes to weapon animations and precision hitboxes.

EDIT: Turns out, existing roblox games like criminality do exactly what I am looking for, so if you have any idea as to how that effect is achieved in criminality I would be grateful.

Heres what a swing looks like in Mordhau (Blood warning).

I am just assuming that mordhau swings are done procedurally as animations within the game are able to be morphed into each other and changed by factors like player and camera movements.
I am not looking to emulate this effect as closely as possible, but I am looking to try and create a slice of this, that being weapon swings that can be animated procedurally.

I am aware that mordhau and such games, use raycast hitboxes. I have already found and test a raycast hitbox module here, which also makes reference to mordhau.

Within my game, I have got weapon swings both with a view model and third person, but my biggest issue is that when players use both animations they won’t match up perfectly or similarly enough and will make both attackers and defenders unable to predict where the next attack in their fight will land. Where as mordhau, attacks are recieved exactly as they’re seen.

If someone could start me off with and idea, or an approach as to how you would do it, or even any knowledge of other roblox games doing it, that would be greatly appreciated.

1 Like

I imagine it’s animations + an IK layer.

I’ve done procedural animations before and it’s usually hard to generate the right elbow/knee ankles without unnatural bending, but it’s still possible but you’d have to add a lot of constraints through trial an error.

So my idea is to make 1 first person animation horizontal level with a basic swing that goes towards the crosshair.

Then add an IK or CFrame modification to adjust it to the camera when it looks up and down with 2 constraints

  1. Weapon swing goes to the center of the crosshair
  2. Arm shoulders still stay connected onto the players character and doesn’t become Rayman (rayman is cool)

So you mean, animate the sword through script, and then IK the players hands to the sword?