Hi there,
I’ve been learning Unreal for a week-ish now to prepare for a new job, and I’ve run into something kind of baffling and wanted to get some smarter takes on it.
I’m trying to make the Top Down Template multiplayer. I’ve already replaced all of the calls to SimpleMove in the blueprint library and made my controller use the nav system correctly on the server.
The server moves correctly and replicates movement smoothly to other clients, but the owning client jitters and stops constantly. I logged out the movement deltas and can confirm that it jumps every 4th frame. With bOrientToMovement checked, I also rotate correctly on other clients. However, and this is where I’m confused, the Autonomous_Proxy of my controller doesn’t rotate at all, even though it receives a replicated rotation call (I confirmed this by overriding PostNetReceiveLocationAndRotation.
Here’s what I’ve tried: [ol]
[li]RPC the rotation of the server actor to the client every frame.[LIST=1][/li][li]This technically rotates the unit, but then, only on the owning client, I get very weird behavior with regards to animations and jittering of the position which I mentioned above. This also just seems wrong because we should be replicating rotation no problem.[/li][/ol]
[li]UseControllerDesiredRotation[ol][/li][li]This just seems wrong too, since the actor itself should be rotating it. And this also came with weird problems.[/li][/ol]
[li]Use ControllerYaw[ol][/li][li]This got deprecated and again seems wrong in a Rotation-replicated world.[/li][/ol]
[/LIST]
I’ve been googling for days now and came across this post which discusses that the CharacterMovementComponent doesn’t actually replicate rotation in ClientAdjustMovement. I’ve already written my own character movement component in an attempt to stop some of the movement packet combining in case that was causing the jitter (my logic was perhaps a delay is causing a big jump in the interpolation if we’re using something like Projective Velocity Blending or something.
At this point, I feel like I’m just doing something simple and wrong, but I’m too ignorant to see that. Has anyone successfully done this in the C++ template?