UCharacterMovementComponent::GetLastUpdateVelocity
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallableconst
Description
Returns the character's velocity as recorded at the end of the most recent movement update.
Caveats & Gotchas
- • May differ from the live Velocity property if something modified velocity after the last movement tick completed (e.g. an impulse applied mid-frame).
- • Commonly read in animation blueprints or Tick() to drive locomotion blending without forcing the component to recompute velocity.
Signature
FVector GetLastUpdateVelocity() const Return Type
FVector Example
Drive a locomotion blend from the last recorded velocity C++
const float Speed = GetCharacterMovement()->GetLastUpdateVelocity().Size2D();
GetMesh()->GetAnimInstance()->SetMovementSpeed(Speed); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?