How can I use a reload animation correctly for two weapon modes without grip and with grip?!

Hey guys, I’m having trouble with reload animations in Unreal Engine. Can anyone help me out?

In my game, the weapons are customizable, and you can add a grip to them. I created a reload animation for each weapon, but it’s only for the version without the grip. I need to know how to properly run the reload animation for other versions of the weapon (like with the grip).

I implemented the system shown in the picture below, but at the start and end of the reload, the left hand lags (it shifts a bit) before the animation plays. What am I doing wrong? This system works perfectly smooth for weapons without the grip!

In this video, the gun mode is with grip.
2024-07-08 22-26-36.mkv (6.6 MB)

Please help!!!

Are you using any IK after the additive?
My guess is that in the montage you do have the AlphaLeftHand, but you also have blend in/out, and because of that the AlphaLeftHand curve is getting values from both.
Try to debug that float, you’ll probably see that at the end of the montage the float will go to 1, then goes to 0, then goes back to 1 in a single frame.
What you should do is to use a Float as a blend value for the Apply Additive, and also add another curve to the montage, this time a metacurve ( named LeftHandDefault or something like that ) with a default value of 1 for the entire length of the montage.
Then use the GetCurveValue ( or GetCurveValueWithDefault set to 1 ) using the AlphaLeftHand and use a safe divide node and as input B use another GetCurveValueWithDefault with default set to 1, using the LefHandDefault curve name.
By doing so the curve value will follow the curve you have in the montage without being affected by the blend i/out of the montage, and the pop you see on the left hand should go away.

Thanks for your solution. Yes, I used ik after apply additive, but after deleting the ik node, the problem was still there! I’m confused, can you explain on the picture what I should do?!
Tnx.

Add a Metacurve to the montage, so that you have something like this


Then on the Apply additive node use the GetCurveWithDefault nodes with a safe divide, like so

I think that this should get rid of the popping issue.
If this works try to connect the IK node, but I don’t know where the IK nodes gets its data, so first make sure that the solution above fixes the issue, then take care of the IK.

1 Like

Dude! I’m really sorry. I’m using Unreal 4.27 and it seems that GetCurveValueWithDefault node doesn’t exist in this version!!
Do you have a solution for this version of the engine?!
Or the best way is to migrate to the new version of Unreal?!
Because the solution you provided worked!!

You can use GetCurveValue and then what you may want to do is to modify the AlphaLeftHand curve so that it’ll go from 1 to 0 at the beginning and from 0 to 1 at the end.
In the AnimBP you then use GetCurveValue and clamp the result, so that min=1 max=0, basically inverting the curve value, same thing for the LeftHandDefault, so you’re always dividing by 1.
By doing so you can use the safe divide and pretty much solve the issue.

1 Like

Dude, I really appreciate you trying to solve my problem.
I found a very simple solution!!!
I added a curve called AlphaLeftHand to the idle animation, which is 1 all the time!!!

Glad it was easier than expected :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.