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")));
}
}
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.