UCharacterMovementComponent::GetCurrentAcceleration
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns the current acceleration vector, computed each update from player input and clamped by GetMaxAcceleration().
Caveats & Gotchas
- • Reflects input-derived acceleration only — it's not affected by AddForce() or AddImpulse(), which accumulate separately as pending forces.
- • Reads as zero while no input is applied even if the character is still moving fast (e.g. sliding to a stop), so it's not a substitute for checking Velocity.
Signature
FVector GetCurrentAcceleration() const Return Type
FVector Example
Drive a lean animation from acceleration C++
const FVector Accel = GetCharacterMovement()->GetCurrentAcceleration();
const float LeanAmount = FVector::DotProduct(Accel.GetSafeNormal(), GetActorRightVector()); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?