Hi.
I’m playing my AnimMontage like this:
void AActivateItem::PlayAnimation()
{
// try and play a door open animation if specified
if (OpenAnimation != NULL)
{
// Get the animation object for the skeletal mesh
UAnimInstance* AnimInstance = Mesh->GetAnimInstance();
if (AnimInstance != NULL)
{
if (!AnimInstance->Montage_IsActive(OpenAnimation))
{
AnimInstance->Montage_Play(OpenAnimation, 0.2f);
}
}
}
}
When I play the animation, the anim montage plays from start to finish, and then at the end of animation cycle it goes back to the starting position. How do I stop the animation montage at end of cycle, in CODE?
I’m trying to get the door to stay open when the animation montage is finished.