Download

(SOLVED!) Montage is timed / ends prematurely?

Hi, I encountered a strange issue with a new animation montage I made that I need help with, I haven’t had this issue with other montages that I made and used previously with the same method.
The timeline for sections and in the preview just isn’t matching the animations at all for some reason. (They are correctly placed in the preview, but way off when the montage is actually played)

I’m playing a montage using the Montage_Play() function in c++.
But it appears to only play a tiny piece of the first section of the montage, instead of playing the entire thing.
Have I missed something?

I have an animation notify that somehow still triggers before the end of the first section.
I confirmed with a custom function that the anim notify is triggered, but there’s no section of the animation still playing.


void UCharAnimInstance::HoldBlock()
{
FName CurrentSection = Montage_GetCurrentSection(BlockMontage);

if (BlockMontage)
{
if (CurrentSection.IsEqual("BlockUp"))
{
Montage_Pause(BlockMontage);
GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Red, FString::Printf(TEXT("Block Held")));
}
else
{
GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Red, FString::Printf(TEXT("Error: Block got held after animation already ended")));
}
}

BlockError.jpg
The pause never triggers.

I can work around it by dragging the start of the second section way later than it should be, until it is offset enough to match where I want it actually be. Then the pause actually triggers. But it’s in actuality near the end of the entire animation in the preview.
If I drag the anim notify closer to the end of the first section, the event never triggers.

So it appears that the montage ends itself near the end of the first section, no matter how I distribute it. Any ideas?

Edit: Figured it out! My animations were too short for the default blend in-out times.

Came across the exact same issue today and came to the same conclusion :slight_smile:

There is a tick box to stop the animation when it reaches the end of a section or completes. Its the tick box under blend out time in the montage editor.

If i hadnt just switched off my computer i’d tell you what it was called :slight_smile:

Did you ever figure out how to get *some *blending? My animation always ends early no matter how small of a value I try to put into the inputs.

I just sort of cheated and split the animation up into two different montages, once the 1st montage had stopped i call the 2nd montage after a set time. Probably not a good method for what you’re doing though i was messing with falling animations using physical animations so the blending didnt really matter :frowning: