RealDocs

UAnimInstance::BlueprintUpdateAnimation

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

Description

Blueprint event called every frame to update animation state. Override this in your Animation Blueprint to compute blend weights, locomotion variables, and other values that drive state machine transitions and blend spaces.

Caveats & Gotchas

  • Runs on the game thread every frame, so expensive logic here directly impacts frame rate. Move heavy calculations to BlueprintThreadSafeUpdateAnimation when possible, or use property access instead of variable polling.
  • DeltaTimeX can be zero on the first frame after initialization — guard division-by-zero when computing rates or velocities from delta time.

Signature

virtual void BlueprintUpdateAnimation(float DeltaTimeX)

Parameters

Name Type Description Default
DeltaTimeX float Time in seconds since the last animation update.

Return Type

void

Example

Update locomotion variables C++
// In Animation Blueprint event graph:
// 1. Override BlueprintUpdateAnimation
// 2. Get velocity from the owning pawn
// 3. Set Speed and Direction variables for blend spaces

// C++ equivalent:
void UMyAnimInstance::NativeUpdateAnimation(float DeltaSeconds)
{
    Super::NativeUpdateAnimation(DeltaSeconds);
    if (APawn* Pawn = TryGetPawnOwner())
    {
        Speed = Pawn->GetVelocity().Size();
        bIsInAir = Pawn->GetMovementComponent()->IsFalling();
    }
}

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.