UCharacterMovementComponent::GetLastUpdateRotation
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallableconst
Description
Returns the UpdatedComponent's rotation as recorded at the end of the most recent movement update, converted from the internally stored quaternion.
Caveats & Gotchas
- • Internally stored as a quaternion (LastUpdateRotation) and converted to FRotator on every call — prefer GetLastUpdateQuat() in hot paths that read it repeatedly.
- • Like GetLastUpdateLocation(), this can be stale if the component was rotated by something other than this movement component since the last tick.
Signature
FRotator GetLastUpdateRotation() const Return Type
FRotator Example
Read the character's rotation after the last movement update C++
const FRotator LastRot = GetCharacterMovement()->GetLastUpdateRotation();
UE_LOG(LogTemp, Log, TEXT("Last update yaw: %f"), LastRot.Yaw); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?