RealDocs

UCharacterMovementComponent::ApplyNetworkMovementMode

function Engine Since unknown
#include "GameFramework/CharacterMovementComponent.h"
Access: public Specifiers: virtualENGINE_API

Description

Decodes a packed network movement mode byte and applies it to the character, setting MovementMode, custom mode, and GroundMovementMode in one step.

Caveats & Gotchas

  • Internally calls UnpackNetworkMovementMode() and then applies the result via SetMovementMode() — overriding one without the other can leave decoding and application inconsistent.
  • Applying a mode change here can trigger OnMovementModeChanged(), which may have side effects (e.g. resetting velocity) — this happens as part of normal move replication, not just when you call it manually.
  • Called during move processing on both server and simulated proxies; calling it manually outside that flow can fight with the next replicated update.

Signature

virtual void ApplyNetworkMovementMode(const uint8 ReceivedMode)

Parameters

Name Type Description Default
ReceivedMode const uint8 The packed movement mode byte received over the network, as produced by PackNetworkMovementMode().

Return Type

void

Example

Applying a received mode byte C++
// Typically invoked internally when processing a replicated move, e.g.:
GetCharacterMovement()->ApplyNetworkMovementMode(ReceivedPackedMode);
// Movement mode, custom mode, and ground mode are all updated to match the sender.

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.