ACharacter::RepRootMotion
#include "GameFramework/Character.h"
Access: public
Specifiers: UPROPERTYReplicatedUsing=OnRep_RootMotion
Description
Replicated struct that carries root-motion montage state from the server to simulated proxies. Updated each frame by PreReplication when an animation-root-motion montage is active.
Caveats & Gotchas
- • Do not write to this field directly outside of the engine's replication path — use SetRepRootMotion or the movement component's correction RPCs instead. Modifying it manually can desync client simulation.
- • The field is only meaningful on simulated proxies and is ignored on autonomous proxies, which drive their own root motion from local input.
- • OnRep_RootMotion fires when this changes; hook that rep-notify rather than polling the struct if you need to react to root-motion state changes on clients.
Signature
UPROPERTY(ReplicatedUsing=OnRep_RootMotion)
struct FRepRootMotionMontage RepRootMotion Example
Read montage position from the replicated struct C++
// On a simulated proxy, inspect the replicated montage position
const FRepRootMotionMontage& RMData = GetRepRootMotion();
if (RMData.bIsActive)
{
float Position = RMData.Position;
} See Also
Version History
Introduced in: 4.6
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?