ACharacter::SimulatedRootMotionPositionFixup
#include "GameFramework/Character.h"
Access: public
Description
Corrects the position of simulated proxies playing root motion by blending toward the server-authoritative position. Called automatically by the Character Movement Component during simulation updates.
Caveats & Gotchas
- • This runs only on simulated proxies (ROLE_SimulatedProxy). Do not call it on locally-controlled or authority pawns — the result is undefined and can corrupt movement state.
- • The correction blends smoothly rather than snapping, so there is a brief desync window after a server correction that may be visible to observers on other clients.
Signature
ENGINE_API void SimulatedRootMotionPositionFixup(float DeltaSeconds); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaSeconds | float | Time elapsed since the last frame, in seconds. | — |
Return Type
void Example
Override to log root motion corrections in a debug subclass C++
void AMyCharacter::SimulatedRootMotionPositionFixup(float DeltaSeconds)
{
const FVector Before = GetActorLocation();
Super::SimulatedRootMotionPositionFixup(DeltaSeconds);
const FVector After = GetActorLocation();
if (!Before.Equals(After, 1.0f))
{
UE_LOG(LogTemp, Verbose, TEXT("Root motion fixup delta: %s"), *(After - Before).ToString());
}
} Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?