RealDocs

ACharacter::ClientAdjustRootMotionSourcePosition_Implementation

function Engine Deprecated Since 4.15
Deprecated: Use ClientMoveResponsePacked_Implementation instead.
#include "GameFramework/Character.h"
Access: public

Description

Client-side implementation body for the deprecated ClientAdjustRootMotionSourcePosition RPC. Applies the server's root-motion-source correction to the local simulation.

Caveats & Gotchas

  • • Deprecated alongside its RPC declaration — override the packed response implementation for new projects.
  • • Must call Super to apply the actual position snap and root-motion-source resync; omitting Super leaves the client desynced.
  • • The FRootMotionSourceGroup parameter is replicated by value into this call; modifications to it here do not propagate back to the server.

Signature

ENGINE_API void ClientAdjustRootMotionSourcePosition_Implementation(float TimeStamp, FRootMotionSourceGroup ServerRootMotion, bool bHasAnimRootMotion, 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 Server timestamp of the move being corrected. —
ServerRootMotion FRootMotionSourceGroup Root motion sources from the server. —
bHasAnimRootMotion bool Whether an animation montage root-motion is also active. —
ServerMontageTrackPosition float Montage position if animation root motion is active. —
ServerLoc FVector Corrected world location. —
ServerRotation FVector_NetQuantizeNormal Corrected rotation as a packed normal. —
ServerVelZ float Vertical velocity at the correction point. —
ServerBase UPrimitiveComponent* Movement base component. —
ServerBoneName FName Bone on the skeletal base, if any. —
bHasBase bool Whether there is a valid movement base. —
bBaseRelativePosition bool Whether location is base-relative. —
ServerMovementMode uint8 Packed movement mode. —

Return Type

void

Example

Override to inspect source correction before applying C++
void AMyCharacter::ClientAdjustRootMotionSourcePosition_Implementation(
    float TimeStamp, FRootMotionSourceGroup ServerRM, bool bHasAnim,
    float TrackPos, FVector Loc, FVector_NetQuantizeNormal Rot, float VelZ,
    UPrimitiveComponent* Base, FName BoneName, bool bHasBase, bool bBaseRel, uint8 Mode)
{
    Super::ClientAdjustRootMotionSourcePosition_Implementation(
        TimeStamp, ServerRM, bHasAnim, TrackPos, Loc, Rot, VelZ,
        Base, BoneName, bHasBase, bBaseRel, Mode);
}

Version History

Introduced in: 4.15

Version Status Notes
5.6 deprecated Superseded by ClientMoveResponsePacked_Implementation.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.