I am trying to play an animation montage from C++. The code is correct but the montage will not play the animation. I did UE_LOGs and the Shoot() function is being called but the animation does not play. If I swap animations the animation will play the new animation. I think the problem is with the animation sequence when I convert it to a montage. When I convert it to a montage the thumbnail is hot show a fire weapon pose just a mannequin with it’s arms out to the side. If I just do Play Animation in blueprints the animation is fine. It is just when playing the animation thru a montage. And it only happens with this particle animation from the animation starter pack. (Fire_Rifle_Ironsights)
Here is my C++ code:
void ADeltaAssaultPlayerBase::Shoot()
{
UAnimInstance* AnimInstance = GetMesh()->GetAnimInstance();
WeaponBase = Cast(GetOwner());
if (AnimInstance)
{
AnimInstance->Montage_Play(IronSightMontage);
AnimInstance->Montage_JumpToSection(FName(“Ironsight”));
}
if (WeaponBase)
{
WeaponBase->Shoot();
}
}
the AnimMontage blueprint not showing an actual pose of the Character aiming:
Animation working in the Animation Montage:
animation montage not working in the editor but is actually being called, The code that’s popping up can be ignored I did not put the UE_LOG in the correct if statement.
Montage working with the Hip Fire animation:
Montage: in the character blueprint:
What am I doing wrong?