[UE 5.3] Controller rotation override by the client after a possess

I discovered a (pretty big) default in the possess function. If you use AController::OnPossess() to move the controller from a pawn to another, the controller will move to the new pawn, will set its rotation equal to the new pawn rotation using AController::SetControlRotation(), but this rotation will be instantly overrided by UCharacterMovementComponent::ServerMove_PerformMovement(), I assume receiving client input during the process. The result is that the new pawn will have the same rotation than the previous pawn’s rotation.

This is a huge bug and I’m not sure how to fix it properly.

Solution : Call ClientSetRotation() right after Possess() to force the client rotation.

Do you have a solution using Blueprint?

Exactly the same. ClientSetRotation is just a RPC server to client which set the controller rotation and rotate the pawn in this direction.

1 Like