RealDocs

ACharacter::SetRepRootMotion

function Engine Since 5.0
#include "GameFramework/Character.h"
Access: public

Description

Assigns the replicated root-motion montage struct and marks the property dirty so the change is sent to clients on the next replication pass.

Caveats & Gotchas

  • Should only be called on the server or during replay recording — calling on a client will update the local struct but the change will not propagate to the server.
  • Triggering this every tick when the struct has not changed wastes bandwidth; PreReplication handles the dirty-marking automatically, so direct calls are usually unnecessary in game code.

Signature

ENGINE_API void SetRepRootMotion(const FRepRootMotionMontage& InRepRootMotion)

Parameters

Name Type Description Default
InRepRootMotion const FRepRootMotionMontage& The new root motion replication struct to assign.

Return Type

void

Example

Forcibly clear replicated root motion state C++
FRepRootMotionMontage Empty;
Empty.Clear();
SetRepRootMotion(Empty);

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.