AActor::PostNetReceiveLocationAndRotation
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtual
Description
Called after the actor receives replicated location and rotation from the network via ReplicatedMovement. Updates the actor's transform to match the replicated values. Not called when physics simulation is active on the actor.
Caveats & Gotchas
- • This is NOT called for actors simulating physics — those use PostNetReceivePhysicState instead. Overriding this for a physics actor will silently do nothing.
- • The replicated data comes from ReplicatedMovement, so only bReplicateMovement actors will have this triggered. Override to apply smoothing or interpolation rather than snapping.
Signature
ENGINE_API virtual void PostNetReceiveLocationAndRotation() Return Type
void Example
Smooth position correction on client C++
void AMyActor::PostNetReceiveLocationAndRotation()
{
// Store the corrected server position for interpolation
ServerLocation = GetActorLocation();
Super::PostNetReceiveLocationAndRotation();
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?