ACharacter::GetReplicatedBasedMovement
#include "GameFramework/Character.h"
Access: public
Specifiers: inlineconst
Description
Returns the replicated based-movement info received from the server. Read-only on simulated proxies; do not modify the returned reference.
Caveats & Gotchas
- • The returned reference points to the replicated copy of based movement, not the local authoritative BasedMovement — these can differ transiently between replication updates.
- • On simulated proxies, this is updated via OnRep_ReplicatedBasedMovement; between rep-notifies the data may be one or more frames stale.
- • The MovementBase pointer inside FBasedMovementInfo can be null if the character is not standing on a dynamic base; always null-check before use.
Signature
inline const FBasedMovementInfo& GetReplicatedBasedMovement() const { return ReplicatedBasedMovement; } Return Type
const FBasedMovementInfo& Example
Read base info on a simulated proxy C++
const FBasedMovementInfo& BasedInfo = SomeCharacter->GetReplicatedBasedMovement();
if (UPrimitiveComponent* Base = BasedInfo.MovementBase)
{
FVector BaseVelocity = Base->GetPhysicsLinearVelocity();
// e.g. adjust prediction by base velocity
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?