RealDocs

UCharacterMovementComponent::ClientAdjustRootMotionPosition

function Engine Deprecated Since unknown
Deprecated: Superseded by the packed movement RPC system. Use the packed move response path (ClientHandleMoveResponse) instead.
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: virtualENGINE_APIdeprecated

Description

Legacy fixed-signature client RPC for root motion position correction, superseded by the packed move response system routed through ClientHandleMoveResponse.

Caveats & Gotchas

  • Marked via DEPRECATED_CHARACTER_MOVEMENT_RPC(ClientAdjustRootMotionPosition, ClientHandleMoveResponse) in the header — it's only compiled in when packed movement RPCs are disabled.
  • Whether this legacy path or the packed one is used at runtime depends on ShouldUsePackedMovementRPCs(), which defaults to reading the p.NetUsePackedMovementRPCs console variable.
  • Do not call this directly in new code — implement corrections against ClientAdjustRootMotionPosition_Implementation instead, which both paths funnel into conceptually.

Signature

virtual void ClientAdjustRootMotionPosition(float TimeStamp, float ServerMontageTrackPosition, FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ, UPrimitiveComponent* ServerBase, FName ServerBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)

Parameters

Name Type Description Default
TimeStamp float Client move timestamp this correction responds to.
ServerMontageTrackPosition float Server's authoritative playback position in the active root motion montage.
ServerLoc FVector Corrected world location from the server.
ServerRotation FVector_NetQuantizeNormal Corrected rotation from the server, quantized as a normal vector.
ServerVelZ float Corrected vertical velocity from the server.
ServerBase UPrimitiveComponent* Movement base the server has the character standing on, if any.
ServerBoneName FName Bone name on ServerBase the character is attached to, if applicable.
bHasBase bool Whether ServerBase is valid.
bBaseRelativePosition bool Whether ServerLoc is relative to ServerBase rather than world space.
ServerMovementMode uint8 Packed movement mode the server had at the time of correction.

Return Type

void

Example

Legacy RPC declaration C++
// Only relevant if packed movement RPCs are disabled (p.NetUsePackedMovementRPCs=0):
DEPRECATED_CHARACTER_MOVEMENT_RPC(ClientAdjustRootMotionPosition, ClientHandleMoveResponse)
virtual void ClientAdjustRootMotionPosition(float TimeStamp, float ServerMontageTrackPosition,
    FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ,
    UPrimitiveComponent* ServerBase, FName ServerBoneName, bool bHasBase,
    bool bBaseRelativePosition, uint8 ServerMovementMode);

Version History

Introduced in: unknown

Version Status Notes
5.6 deprecated Superseded by packed movement RPCs; retained behind DEPRECATED_CHARACTER_MOVEMENT_RPC for legacy compatibility.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.