ACharacter::IsPlayingNetworkedRootMotionMontage
#include "GameFramework/Character.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns true if the character is currently playing a root-motion montage with RootMotionMode set to RootMotionFromMontagesOnly, which enables the networked root-motion code path.
Caveats & Gotchas
- • Returns false for montages that use RootMotionFromEverything or NoRootMotionExtraction even if root motion is visually active — only the dedicated networked mode triggers this flag.
- • On simulated proxies, this reflects the locally simulated state, not necessarily the server's current state. Check RepRootMotion.bIsActive for the last replicated authority value.
- • The networked root-motion code path incurs additional per-frame RPC bandwidth; avoid leaving characters in this mode when root motion is not actually needed.
Signature
ENGINE_API bool IsPlayingNetworkedRootMotionMontage() const Return Type
bool Example
Gate logic on networked root motion being active C++
if (IsPlayingNetworkedRootMotionMontage())
{
// Disable manual movement input while root motion montage drives the character
GetCharacterMovement()->DisableMovement();
} See Also
Version History
Introduced in: 4.6
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?