UCharacterMovementComponent::GetLastUpdateLocation
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallableconst
Description
Returns the UpdatedComponent's world location as recorded at the end of the most recent movement update.
Caveats & Gotchas
- • Reflects the position after the last completed movement tick, not the component's live position if something moved it since (a physics push, teleport, or attachment change).
- • Commonly read in networked prediction code to compare against replicated values without triggering another movement pass.
Signature
FVector GetLastUpdateLocation() const Return Type
FVector Example
Compare against the component's current location C++
const FVector LastLoc = GetCharacterMovement()->GetLastUpdateLocation();
const FVector CurrentLoc = GetActorLocation();
const bool bMovedExternally = !LastLoc.Equals(CurrentLoc, 1.0f); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?