RealDocs

ACharacter::GatherCurrentMovement

function Engine Since 4.0
#include "GameFramework/Character.h"
Access: public Specifiers: virtualoverride

Description

Fills the replicated movement struct (`ReplicatedMovement`) with the Character's current location, rotation, velocity, and base information before it is sent to clients. ACharacter extends the base AActor implementation to include Character-specific fields like `ReplicatedBasedMovement`.

Caveats & Gotchas

  • Called automatically by the engine replication system; do not call it manually unless you are re-implementing the network tick.
  • If you override this to suppress certain fields, simulated proxies may de-sync — ensure all fields required by `UCharacterMovementComponent::SmoothClientPosition` are still populated.

Signature

ENGINE_API virtual void GatherCurrentMovement() override;

Return Type

void

Example

Extend to include a custom replicated movement field C++
void AMyCharacter::GatherCurrentMovement()
{
    Super::GatherCurrentMovement();
    // Append extra data to a custom replicated struct alongside the base movement
    ReplicatedCustomMovement.CustomSpeed = GetVelocity().Size();
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.