RealDocs

AActor::OnRep_ReplicateMovement

function Engine Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: UFUNCTIONvirtual

Description

RepNotify callback invoked on clients whenever the `bReplicateMovement` property changes, used to start or stop physics/movement replication.

Caveats & Gotchas

  • This is an internal engine callback — it should not be called directly. The engine calls it automatically after `bReplicateMovement` replicates to clients.
  • If you override this, call `Super::OnRep_ReplicateMovement()` to preserve the engine's default attachment/movement synchronisation logic.
  • Changing `bReplicateMovement` at runtime on the server via `SetReplicateMovement()` is the correct way to affect this; do not set the bit-field directly as it bypasses engine housekeeping.

Signature

UFUNCTION()
ENGINE_API virtual void OnRep_ReplicateMovement();

Return Type

void

Example

React to replication mode change on client C++
void AMyActor::OnRep_ReplicateMovement()
{
	Super::OnRep_ReplicateMovement();
	// Custom logic after movement replication state changes
	if (IsReplicatingMovement())
	{
		DisableClientSidePrediction();
	}
}

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.