Canceling an anim on skeletal mesh to play a new anim,

anonymous_user_53f50c57
Sun, 11 Feb 2018 00:14:22 +0000
Character & Animation

I know I must be overlooking something very simple here, the situation is this: I have a sniper rifle in my FPS project. It has a reload animation where I load rounds one by one into the breach. The gun is animated as a skeletal mesh using “Play Animation” nodes, attached to a socket in the arms mesh, and the arms are animated via state machine and montages.

I have five different anims for arms and gun, depending on how many rounds are needed (reload one, reload two, reload three, etc) and a sixth anim called reload out, where the arms just move the bolt forward and down and we return to idle. There are notifies in all the reload anims to let us know if it’s OK to cancel out and play the “out” animation.

My problem is the “out” animation never plays on the gun - only the arms. Instead, as the arms are playing their “out” montage, the gun finishes whichever reload it was playing (you see floating rounds getting loaded into the breach, bolt goes forward and down).

I’ve tried a couple different things, such as setting up all the gun anims as montages (this actually made things worse - those never seemed to play despite setting a proper slot) and setting up a state machine in a new anim BP for the gun itself. That actually didn’t work as well as using “Play Animation” nodes for things like firing, occasionally the “fire” state would not work and the gun wouldn’t fire.

At this point I’ve spent around 4 hours on the issue and was wondering if anyone out there might have an idea of how to achieve this canceling-out-of-reload functionality. Any advice would be greatly appreciated!
,

8 posts - 1 participant