Is it possible to spin minigun barrels in sync with wind up time?

Hi guys,

I have a minigun that has a short spin up and spin down mechanic when the player presses fire.

I use a timeline that runs, to “wind up” the weapon over time, once it reaches 1, then the weapon starts firing, and keeps firing for as long as the button is held, then spins down once the button is released, playing the timeline in reverse.

Is it possible to somehow make the barrels spin in sync with this wind up/wind down mechanic, and how exactly would I be able to do it if possible?

Should I be using dedicated animations, or is it better to use blueprints (if possible) to animate the spinning barrels?

Hey @Xelus!

You should be able to have your timeline set a variable (0-1). If you already have a similar variable even better. From there you should in theory be able to create a blend space 1D and use your variable to change/lerp between the idle and fully spinning animations.

I hope the above points you in the direction you need!

Thanks for pointing me in the right direction, helped a ton :smiley: , I did however run into a strange problem regarding the blend space and playback animation.

Got 2 animations at the moment, idle of the weapon where the barrels stand still, and the barrel spin animation. By itself, the barrel spin animation plays fine, but in the blend space, it seems to “jitter” back and forth (what looks like its trying to jump back to frame 1), until it reaches 100, then it plays fine.

Did I perhaps miss something regarding the blending of the animations in the blend space?

Beyond the jittering, everything else works fine.

Hey @Xelus,

Would you mind sharing your blendspace settings, animation blueprints, and possibly a video of what you are seeing? This would give us a better idea of what may be going wrong. Also, are you blending the entire body when using your blendspace or just your weapon?

Hey there,

Here is a short clip of what is happening in the blend space, as well as an image of the animation blueprint.


Also added it in a state machine as a test to see if it would’ve changed anything.

And here is a video showing what is happening in the blendspace between the two animations. First showing the barrel spin animation running, then the blendspace. The jittering happens throughout the entire blendspace, until it reaches either the start or end of the blendspace where the respective animations have 100% influence.


Looks like the blendspace is trying to start from the beginning each frame.

Hey @Xelus,

What smoothing type are you using? What about smoothing time?

I suspect this may have something to do with the animations themselves, or import settings of them that messed up. I just setup a blendspace just as the animation starter pack’s, and the jittering still happens. sigh

Hey @Xelus,

The animation starter was intended for characters, not for the weapons themselves. Can we get an in depth look at all of your settings for your blendpspace?

Sure, here is a screenshot of the blendspace. On the one side, when using the weapon in-game, the slight jittering kinda looks cool, since it is a mechanical movement, but on the other side, if I do any other blendspaces, I won’t necessarily want things to jitter. :laughing:

I’ve messed with the Sample Interpolation too, but that doesn’t seem to do much if anything. If it matters though, I am using UE 4.27 at the moment, since my system can’t run UE5, at least not well enough.

I think this is all of the Blendspace settings, let me know if I missed anything.

Hey @Xelus!

Under axis setting, try adjusting your interpolation time and/or changing your interpolation type to a different type (ease in/out, linear, etc.).

Hey there,

So I messed with all of the available interpolation types there, plus messing with the interpolation time, and it seems like nothing changes, went as far, using both small values for the time, as well as large ones, and nothing.

Here is all that is available as interpolation types though.
Blendspace1D_Axis_Interpolation

The one thing that did slightly change was with linear, making the animation look more, uh, choppy I guess, more like almost sprite animations, where it just jumps frame to frame instead of a smooth transition to the next frame if that makes sense. :laughing:

I’m at a loss at this point, not sure what is the cause for this, even re-exported the animations a few days back, set different export settings from blender .fbx exporting to unreal, and still the same result, its weird to say the least.

Hey @Xelus,

If adjusting that transitionary time/interpolation type does not help, it may be best to create 1 or 2 transitionary animations (half speed for example) to smooth out going from idle to max. This should, in theory, help remove any choppiness that you have at the moment.