Hey everyone! Just wanted to make a short update to a previous entry in regards to movement interruption. It turns out that both the Valley of the Ancients and Game Animation Sample Project have an even better solution than I proposed Here is the breakdown:
It all starts with the enumerator, E_TraversalBlendOutCondition
:
Force Blend Out: This option will automatically blend out of the montage once the notify state begins.
With Movement Input: This option will blend out of the montage when the LastInputVector of the owning character movement component is not nearly equal to zero. (This is the solution that I had made for my project!)
If Falling: This option will blend out of the montage when the character movement component detects that we are falling.
Here is what the Blueprint, BP_NotifyState_MontageBlendOut
, looks like:
Now, all you have to do is add the BP_NotifyState_MontageBlendOut
to your montages and select which type of interruption you want to use!
This solution is better than mine for a few different reasons:
- It supports different types of interruptions.
- Its built into the animation notify state itself, without the need to use gameplay tags or additional code.
- It works in multiplayer by default! At least for my project.
I hope others will find the solution helpful and save time in the future! Thank you for taking the time to read this post, and I hope you were able to take something away from it. Please let me know if I got any information wrong, or explained something incorrectly! Also add any thoughts or questions or code review feedback so we can all learn together