UCharacterMovementComponent::ClientHandleMoveResponse
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: virtualENGINE_API
Description
On the client, interprets the server's move response after it's unpacked, dispatching to ClientAckGoodMove_Implementation() if there was no error, or to one of the root motion/position adjustment implementations otherwise.
Caveats & Gotchas
- • This single entry point replaces four separate legacy RPCs (ClientAdjustPosition, ClientVeryShortAdjustPosition, ClientAdjustRootMotionPosition, ClientAdjustRootMotionSourcePosition) — which correction path runs depends entirely on the payload flags.
- • Overriding this without calling Super can silently break client-side correction and root motion resync, since the dispatch logic lives here.
Signature
virtual void ClientHandleMoveResponse(const FCharacterMoveResponseDataContainer& MoveResponse) Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| MoveResponse | const FCharacterMoveResponseDataContainer& | The unpacked response data received from MoveResponsePacked_ClientReceive(). | — |
Return Type
void Example
Override to observe corrections C++
void UMyCharacterMovementComponent::ClientHandleMoveResponse(const FCharacterMoveResponseDataContainer& MoveResponse)
{
if (!MoveResponse.bHadError)
{
UE_LOG(LogTemp, Log, TEXT("Move accepted without correction"));
}
Super::ClientHandleMoveResponse(MoveResponse);
} See Also
Version History
Introduced in: 4.26
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?