In a networked game, call ACharacter::SetActorRotation() on local client, most of the time it rotate, but sometimes it does not rotate.
How to repeat:
-
In UE4.16, create “Third Person” standard project, keep all default settings;
-
In the “ThirdPersonCharacter” blueprint, capture key “F” event, and in the event, just call SetActorRotation() to let character’s yaw rotation +90 degrees;
- Check the “Run dedicated server” option under “Play” button;
Test result:
sometimes the character rotate when pressed “F”, sometimes not rotate at all.
Expect result:
The character should always rotate locally.
More test:
If I use “Standalone” mode to test, the character always rotate.
If I use a replicated server function, to let server rotate first and then replicate the new rotation to client, then client rotate, the test result still is sometimes rotate, sometimes not.