RealDocs

ACharacter::ClientAdjustPosition

function Engine Deprecated Since 4.0
Deprecated: Use ClientMoveResponsePacked() instead.
#include "GameFramework/Character.h"
Access: public Specifiers: UFUNCTIONdeprecated

Description

Deprecated client RPC sent by the server to correct the client's position and velocity after detecting client-side prediction error. Replaced by ClientMoveResponsePacked() since UE 4.26.

Caveats & Gotchas

  • • Deprecated since 4.26. Position corrections are now delivered via ClientMoveResponsePacked, which is more bandwidth-efficient and supports variable payloads.
  • • When this correction fires, the client will snap to the corrected position and replay all saved moves that occurred after the corrected timestamp — this can cause a visible position pop if the error is large. Tuning UCharacterMovementComponent::MaxClientSmoothingDeltaTime can soften the visual impact.

Signature

void ClientAdjustPosition(float TimeStamp, FVector NewLoc, FVector NewVel, UPrimitiveComponent* NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode)

Parameters

Name Type Description Default
TimeStamp float Timestamp of the ServerMove this correction corresponds to. —
NewLoc FVector Corrected world location from the server. —
NewVel FVector Corrected velocity from the server. —
NewBase UPrimitiveComponent* Movement base component the server has the character on. —
NewBaseBoneName FName Bone name on the base component. —
bHasBase bool Whether the character has a movement base. —
bBaseRelativePosition bool Whether NewLoc is relative to the base. —
ServerMovementMode uint8 Movement mode on the server. —

Return Type

void

Example

Understanding when corrections occur C++
// You do not call this RPC directly. The server sends it automatically when
// the client's predicted position deviates from the server position by more than
// KINDA_SMALL_NUMBER. To reduce correction frequency, keep server/client
// movement logic identical and minimise physics interactions that diverge.

Version History

Introduced in: 4.0

Version Status Notes
5.6 deprecated —
4.26 deprecated Replaced by ClientMoveResponsePacked.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.