UCharacterMovementComponent::ServerMove
Deprecated: ServerMove() is deprecated, use ServerMovePacked_ClientSend() 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: virtualUFUNCTIONServerUnreliableWithValidation
Description
Legacy server RPC that a client calls to replicate a single player move — its acceleration input, resultant location, and view — to the authoritative server.
Caveats & Gotchas
- • Deprecated since 4.26 in favor of the packed-movement path (ServerMovePacked_ClientSend / ServerMovePacked_ServerReceive); it only compiles into an active code path when SUPPORT_DEPRECATED_CHARACTER_MOVEMENT_RPCS=1 is defined and p.NetUsePackedMovementRPCs=0.
- • This is a stub that just forwards to ServerMove_Implementation and ServerMove_Validate — UFUNCTION(Server) code generation supplies the actual RPC dispatch.
- • Called internally by ACharacter's replicated move plumbing (via CallServerMove); it isn't meant to be invoked directly from gameplay code.
Signature
virtual void ServerMove(float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent* ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| TimeStamp | float | Client timestamp for this move. | — |
| InAccel | FVector_NetQuantize10 | Compressed acceleration input for the move. | — |
| ClientLoc | FVector_NetQuantize100 | Client's resultant location after performing the move locally. | — |
| CompressedMoveFlags | uint8 | Packed per-move flags (jump, crouch, custom flags, etc.). | — |
| ClientRoll | uint8 | Compressed client view roll. | — |
| View | uint32 | Compressed client view yaw/pitch. | — |
| ClientMovementBase | UPrimitiveComponent* | Component the client believes it's standing on. | — |
| ClientBaseBoneName | FName | Bone name on the client's movement base, if a skeletal mesh. | — |
| ClientMovementMode | uint8 | Packed client movement mode at the time of the move. | — |
Return Type
void Example
Legacy client-to-server move RPC signature C++
// Declared with UFUNCTION(unreliable, server, WithValidation) in the deprecated RPC block.
// Sent automatically by the movement system when using the legacy (non-packed) RPC path.
virtual void ServerMove(float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc,
uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View,
UPrimitiveComponent* ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode); See Also
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?