Could you check if that shoot event of yours is being constantly activated? It might be playing the animation for just a single frame, getting activated again and start playing from the start
you refresh the montage every tick,so it keeps the begin pose forever.
if my assumption is correct.
you want the machine gun to rotate while it shooting.
The montage doesn’t support looping(at least I didn’t find the feature).
so I recommend to make a anim blueprint for the machine gun.if the gun is firing,change a Boolean.and then the anim BP auto plays the rotating animation.this way it can loop.
Oh right, I was testing with my stuff and didn’t think about that I wanted to see something but nvm. I’ll think of a way to do that using montages, and yeah I also don’t remember using montages for such a thing for myself maybe it’s not possible as
@baobao4435 says but let’s see
I’m still investigating but to progress step by step, can we make sure in your animation blueprint, you plugged in a “default” slot to the out pose?
Note: I didn’t mean the character’s one, the weapon’s one
Hold up it was a child right? You make it work in your character animation blueprint as well? I mean no you don’t do that currently but ok I get it. I was thinking about all the different possibilities so I might think of things that don’t fit your use case as well
Yes, I made two animations. The Idle animation, the cannon doesn’t move… and the turning animation where the cannon does move.
I tried it in both modes (with default animation and without animation).
In fact when I use the default moving animation there is no problem…
only the transition from idle to rotation does not work
If you mean if the weapon is attached to the character… yes, that’s right.
Yes, my character’s AnimIntance works perfectly (But they are two independent actors… the character is one thing and the weapon another… the AnimInstance only deals with the character’s movements)
there could be many methods to achieve the effect(no absolute standard one ). You can share yours.
using an animBP,or even not using any anim BP.just add a poseable mesh and rotate its bone(I often do this when it needs simple animation,bad practice )
it also support actor,you can use this node instead
Weird idea, but you could try creating a blend space for the model, and have the “speed” set on click of the fire button, or just call a play animation node and set it looping, and run a check for input released to stop the animation
I actually didn’t have the need to loop an anim montage yet, I used anim blueprints and sometimes montages for less intricate stuff. I got some interesting ideas that may or may not work for montages in my research for this problem but it seems like what
@Ivan3z is doing works right now
And if you’re gonna have a dedicated one for it, of course it would be better to control all those intricate animations using satates but if you wonder, you can also make it work with anim montages in that case. Though it would be less practical
play anim montage requires you to have an animbp for the gun with a “DefaultSlot” in anim graph, or it wont work. rather than anim, i would suggest use timeline in cahracter/gun event graph in this context, it’s easy to implement and give same result.