Download

What's the best implementation approach to this?

This is my base state machine configuration:

It works perfectly.

I now want to add 3 types of weapons to the game: Glove type , Rifle Type and Melee

Todo list:
The rifle type isn’t that much fancy, just an additive - idle and recoil- animation on the upper body (on the hand, it just holds the gun - the game isn’t realistic etc)
Same thing applies to the glove: Just an additive - throw bomb and idle - animation on the upper body.

The melee as well how I am going to tie all of this together is what confuses me:
The player can do a 3 hit combo (SwingOne-SwingTwo-SwingThree) as well as a jump attack towards the ground . The jump attack cancels the jump or glide and plays an animation (Start-Loop-End parts, similar to the Jump example on the ThirdPersonProject).

This is what I have in mind: a336155eb837e139c474c937ca81be7510be62ad.png

Do this essentially for everything:

Then, combine everything resulting in a pose just before the aimoffsets

Then, apply aimoffsets respectively:

Thanks in advance!

I would go with blend Per bone.

If blended at Spline the flow would be

Locomotion (jump) > Blend Per Bone > Spine > Attack.

This makes the Locomotion state unique to whatever action state is triggered with out the need for a Jump_attack.

You would for example could be in a Walk state and use the same Attack you just used in the Jump state.

So blend per bone when?
And what does the > Spine > Attack stands for? (Also, the attack animations are not only upper body)

This

Locomotion (jump) > Blend Per Bone > Spine > Attack

Indicates the animation migration and in this case from the Locomotion state machine is in the (jump) state which is then migrated through the Blend Per Bone starting at the > Spine bone Using the > Attack sequence.

The resulting final output will be the player model Jumping while attacking at the same time.

If the migration is Locomotion (walk) > Blend Per Bone > Spine > Attack then the player model will Walk while Attacking.

Also referred to as animation layering or in the case of Motion Builder an over ride.

The migration order depends on what needs to blend first as part of the hierarchy so in most cases one would start first with Locomotion as the first layer always starts at the root. AKA where goes the legs so goes the player model. :wink:

Next you could migrate through a Blend Per Bone to layer the Attract, or what ever you wish, using the Spine, or what ever you are using as the first joint of the upper torso, and will over ride the torso animation coming in from the locomotion state machine.

In general try avoiding the addition of an action state to a locomotion state with in the same state machine as it should only be used to make the player move.

Thanks for the info :slight_smile:
I’ll re-tag you after it’s done in order to receive some verification? (1st deep dive into animations)

If I remember correctly this stream goes in details on how animation system with multiple weapons/swings was implemented in Fortnite so you might find it useful

Thanks :slight_smile:
I clicked the “Animation Deep Dive” link on the pinned post but there was no such video on the archive so I guess that’s it?

Deep dive is here, but yeah, seems like all twitch links are outdated. I will update them to appropriate youtube videos

I guess I’ll watch both :>

So after watching the streams:

  • I added another state inside the “Run Jump Glide” state machine, called grapple (essentially its just the player with one hand up, rotation while hanging from the grapple point is done by code (could be done by aimoffset?)).
  • I will make a melee state that is going to fully override the previous state machine if there is melee action happening (not sure if I am going to do the 1-2-3 hit combo with montage - thats probably the way to go)
  • If there is a gun equipped aside the melee weapon and some other exceptions I am just going to blend with the upper body slot
  • For any additional stuff I am going to use animation montages (crouch->jump=bigger jump with root motion, crouch+click(melee)->throw axe or whatever…)

What do you think? :smiley:

P.S. just noticed you are the guy with supergrid, good job! I am going to buy this soon, hopefully its a good replacement for my awful programmer art modelling and level block-out skills