RealDocs

AActor::SetPhysicsReplicationMode

function Engine Blueprint Since 5.1
#include "GameFramework/Actor.h"
Access: public Specifiers: UFUNCTIONBlueprintCallable

Description

Sets the physics replication mode for this actor, controlling how physics state is synchronized from server to clients. Only meaningful when the actor has bReplicates=true and a simulating physics component.

Caveats & Gotchas

  • Has no effect if the actor's root component does not simulate physics — the mode is stored but ignored during replication.
  • PredictiveInterpolation mode (UE 5.1+) requires the Physics Prediction plugin and can trigger resimulations on the client if the error threshold is exceeded.
  • Changing this at runtime on the server is safe, but clients may exhibit one-frame glitches while they adapt to the new mode.

Signature

ENGINE_API void SetPhysicsReplicationMode(const EPhysicsReplicationMode ReplicationMode)

Parameters

Name Type Description Default
ReplicationMode const EPhysicsReplicationMode The new physics replication mode to use for this actor's root component.

Return Type

void

Example

Use Default replication for a replicated physics prop C++
// In actor constructor or BeginPlay on server
if (HasAuthority())
{
    SetPhysicsReplicationMode(EPhysicsReplicationMode::Default);
}

Version History

Introduced in: 5.1

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.