RealDocs

UAnimInstance::MontageSync_StopFollowing

function Engine Blueprint Since 4.22
#include "Animation/AnimInstance.h"
Access: public Specifiers: ENGINE_APIBlueprintCallableUFUNCTION

Description

Breaks the sync link established by MontageSync_Follow so that the follower montage resumes independent playback. Call this before stopping either montage to avoid dangling sync state.

Caveats & Gotchas

  • Failing to call MontageSync_StopFollowing before the leader montage ends does not crash, but the follower will lose its sync target silently and may exhibit unexpected position jumps on the next update.
  • This only removes the follower relationship on this anim instance. If you set OtherAnimInstance to self in MontageSync_Follow, the same instance is affected; otherwise only the follower instance needs to call this.

Signature

ENGINE_API void MontageSync_StopFollowing(const UAnimMontage* MontageFollower);

Parameters

Name Type Description Default
MontageFollower const UAnimMontage* The montage on this anim instance that should stop tracking its leader.

Return Type

void

Example

Clean up sync on interaction end C++
void AMyCharacter::EndDuetInteraction()
{
	NPCAnimInst->MontageSync_StopFollowing(NPCDuetMontage);
	NPCAnimInst->Montage_Stop(0.25f, NPCDuetMontage);
	PlayerAnimInst->Montage_Stop(0.25f, PlayerDuetMontage);
}

Version History

Introduced in: 4.22

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.