The rotate function is running on server ,and multicast set actor rotation to update the client character rotation.
But using set actor rotation makes the rotate of the character really stutter.
Is there a way in blueprint to update the character more smoothly?
If your pawn is actually a character, you should stick to character movement replication instead.
My guess is that you try and multicast replicate the rotation, causing the clients to simulate the rotation, then the default character replication comes in and creates the stutter. What happens when you just leave the multicast out and stick to the server only applying the rotation?
Now comes something interesting…In the client now i’m playing ,the characters rotation looks very stutter,almost stuck in the same place.But in the other client`s view ,my character rotates much more smoothly, basically feels like what i want.
Hi, if your pawn don’t has wheels I would strongly recommend that you use a character instead, because it seems to me that right now you’re taking a pawn and trying to turn it into a character
If you want to replicate movement of a pawn, then first you can increase the precision of the replicated rotation.
And run the movement logic on the client and server to reduce/eliminate lag due to network latency/update frequency. So when the player inputs something the client will react (rotate) immediately without stutter. Then the server runs the same logic and then replicates it over to the client and all other clients. And because they are running the same logic and if you have increased the precision of the replicated rotation, normally you won’t see any difference.
That described setup above is nearly the same as what the “Character Movement” does automatically (the character movement also interpolates between the current state of the client and the replicated state of the server so there you normally won’t need to increase the precision), so you could directly use a character and save the work.
My character is already based on third person character.I almost didnt change any thing about Characters Forward&back Movement ,but to simulate the inertia of the character`s rotation, i used timeline for it,and change it to tank movement. I think the way i make it move like tanks cause all of this problems.
when i link it like this ,the character rotate twice speed on the server
When the rotation only run on server,and no multicast,the client cant rotate at all, although in the servers view it rotated,but can`t actuall walk towards the direction of its rotation.
When add in run on own client ,the server is fine ,but the rotation in client is half of the client.
If your mech is a “Character” and not only a “Pawn”, the default character movement should handle the replication so you should not multicast it and only apply the rotation serverside.
What does your “Mech Rotation” function actually do? Does it only like “AddActorRotation” or do your mechs maybe rotate based on animation with root motion? If this is root motion based, replicating this would be a bit more complex.
MechRotation is just AddActorRotation with some bool to branch the speed with rotation.The AddActorRotation make the rotation of my character bypass the character movement. So it won’t be replicated and cause it act like this.
Now i knew that the best way to fix this may just write a C++ for my own.But it looked not worth it for me to stuck on this now.Now im working on the graphics part of my game,so thanks for all your help and advise.Maybe after this game become more completely ,i will return back to deal with this problem.Thanks again at last!