RealDocs

UAnimInstance::Montage_SetPosition

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

Description

Jumps the montage playhead to a specific time position without restarting it. Useful for scrubbing, network correction, or skipping to a specific frame.

Caveats & Gotchas

  • Jumping the position does not fire anim notifies that were skipped over — any notifies between the old and new position are silently bypassed. If your gameplay relies on those notifies (e.g. spawning effects), trigger them manually.
  • The montage must already be active. Calling this on an inactive montage has no effect; start it first with Montage_Play.

Signature

ENGINE_API void Montage_SetPosition(const UAnimMontage* Montage, float NewPosition);

Parameters

Name Type Description Default
Montage const UAnimMontage* The montage to reposition.
NewPosition float Target position in seconds from the start of the montage asset.

Return Type

void

Example

Network position correction C++
// On client: correct montage position to match server
void UMyAnimInstance::CorrectMontagePosition(float ServerPosition)
{
	if (Montage_IsActive(ActionMontage))
	{
		Montage_SetPosition(ActionMontage, ServerPosition);
	}
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.