RealDocs

UAnimInstance::Montage_SetPlayRate

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

Description

Changes the playback speed of an active montage without restarting it. Use this to slow down or speed up an animation in response to gameplay events.

Caveats & Gotchas

  • Setting NewPlayRate to 0.0 has the same visible effect as Montage_Pause but the internal state differs — the montage is still considered 'playing' and will not fire the OnMontageEnded delegate unless explicitly stopped.
  • Negative play rates are not supported and will produce undefined behavior; use Montage_JumpToSection to play segments in reverse if needed.

Signature

ENGINE_API void Montage_SetPlayRate(const UAnimMontage* Montage, float NewPlayRate = 1.f);

Parameters

Name Type Description Default
Montage const UAnimMontage* The montage whose play rate should change.
NewPlayRate float New playback speed multiplier. 1.0 is normal speed; 0.0 effectively pauses the montage. 1.f

Return Type

void

Example

Slow-motion finisher C++
// Play the kill montage at half speed during a slow-motion moment
AnimInstance->Montage_SetPlayRate(FinisherMontage, 0.5f);
// Restore normal speed when slow-mo ends
// AnimInstance->Montage_SetPlayRate(FinisherMontage, 1.0f);

Version History

Introduced in: 4.5

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.