RealDocs

UCharacterMovementComponent::ClientVeryShortAdjustPosition

function Engine Deprecated Since 4.0
Deprecated: ClientVeryShortAdjustPosition() is deprecated, use ClientHandleMoveResponse() instead, or define SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1 in the project and set CVar p.NetUsePackedMovementRPCs=0 to use the old code path.
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: virtualUFUNCTIONClientReliable

Description

Bandwidth-saving variant of the legacy ClientAdjustPosition RPC used when the server's corrected velocity is zero, so only position needs to be sent over the wire.

Caveats & Gotchas

  • • Deprecated since 4.26 in favor of the packed move-response path; only compiled into an active code path with SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1 and p.NetUsePackedMovementRPCs=0.
  • • Omits the velocity parameter entirely and assumes zero — the server picks this RPC over ClientAdjustPosition specifically when that assumption holds, so don't substitute it for general corrections.
  • • This is a stub that forwards to ClientVeryShortAdjustPosition_Implementation for the actual correction logic.

Signature

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

Parameters

Name Type Description Default
TimeStamp float Client timestamp of the move being corrected. —
NewLoc FVector Authoritative server location. —
NewBase UPrimitiveComponent* Server's movement base at the time of correction, if any. —
NewBaseBoneName FName Bone name on the server's movement base, if a skeletal mesh. —
bHasBase bool Whether the server considers the character based on something. —
bBaseRelativePosition bool Whether NewLoc is relative to the base rather than world space. —
ServerMovementMode uint8 Packed server movement mode to apply during the correction. —

Return Type

void

Example

Legacy zero-velocity correction RPC signature C++
// Sent by the server instead of ClientAdjustPosition() when the corrected velocity is zero.
virtual void ClientVeryShortAdjustPosition(float TimeStamp, FVector NewLoc,
    UPrimitiveComponent* NewBase, FName NewBaseBoneName,
    bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode);

Version History

Introduced in: 4.0

Version Status Notes
5.6 deprecated Deprecated since 4.26 in favor of packed movement RPCs.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.