Playing an animation montage

jr557
Tue, 05 Dec 2017 19:25:05 +0000
Character & Animation

What is the difference between these two ways of playing an animation montage:

USkeletalMeshComponent* FPSMesh;
UAnimMontage* EquipAnim;

// 1. USkeletalMeshComponent::PlayAnimation()
FPSMesh->PlayAnimation(EquipAnim, false);

// 2. UAnimInstance::Montage_Play()
float Duration = FPSMesh->AnimScriptInstance->Montage_Play(EquipAnim);

What is the difference and when should one be used over the other? What exactly is AnimScriptInstance and when should it be used in C++ code?

2 posts - 2 participants