ACharacter::ClientRootMotionParams
#include "GameFramework/Character.h"
Access: public
Specifiers: UPROPERTYTransient
Description
Stores root motion parameters for the locally-controlled autonomous proxy. During PerformMovement(), root motion is saved here before being recorded into SavedMoves for later playback during move correction.
Caveats & Gotchas
- • This is marked Transient — it is not serialized or replicated. Its value is only valid during the CharacterMovementComponent's move execution window on the owning client.
- • Do not read this outside of a PerformMovement or SavedMove playback context. Its contents are stale between frames and between server corrections.
Signature
FRootMotionMovementParams ClientRootMotionParams; Example
Accessing client root motion params in a custom movement component C++
// Inside a custom CharacterMovementComponent subclass:
void UMyMovementComponent::PerformMovement(float DeltaTime)
{
Super::PerformMovement(DeltaTime);
// After Super, ClientRootMotionParams on the owning character has been populated
FRootMotionMovementParams& Params = CharacterOwner->ClientRootMotionParams;
if (Params.bHasRootMotion)
{
// Custom handling...
}
} Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?