UCharacterMovementComponent::SaveBaseLocation
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtual
Description
Updates OldBaseLocation and OldBaseQuat from the current movement base, storing the relative location/rotation if necessary, ignoring bDeferUpdateBasedMovement.
Caveats & Gotchas
- • Unlike MaybeSaveBaseLocation(), this always runs — it ignores the defer flag, so calling it manually can override the intended deferral behaviour of the based-movement system.
- • Does nothing if there is no valid MovementBase; OldBaseLocation/OldBaseQuat are left at their previous values in that case.
- • Also responsible for caching the character's location/rotation relative to the base, which UpdateBasedMovement() later uses to detect base movement.
Signature
virtual void SaveBaseLocation(); Return Type
void Example
Forcing a base-location refresh outside the normal tick order C++
void UMyCharacterMovementComponent::OnCustomTeleportOntoBase()
{
// Force an immediate refresh, bypassing bDeferUpdateBasedMovement.
SaveBaseLocation();
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?