Question about Replicating movement

Hi,

Been working on a multiplayer project for some time now and all of my character movement is replicated including a lot of custom crouch/leaning/attacking/headoffset etc… I have no problem with the client and server seeing all these actions… Apart from turning on the spot

https://forums.unrealengine.com/showthread.php?65617-Turn-on-the-Spot-for-AimOffset-Replicate

But apart from that it’s all good HOWEVER, I’ve noticed jittering animations… So the walking/running is jittering. It made me think i’m not doing this right… It’s like the client is walking and the server tries to update his movement and causes the choppy looking animations.

Now I know people set up direction etc… in the Animation BP but I’ve set up all my variables that control the animation in my CharacterBP and cast to them from my AnimBP. I think this is the best way to do it.

This is how they’re set up in words (would be better to show a picture but not on dev machine)

Input (Leftmousebutton) > Calls Custom replicate to server (reliable) event > Executes event sets the boolean/float which gets fed to the AnimBP to play Anim.

But should I be doing this in a function or using Server Authority to stop client from doing its own movement? like below

Input > Branch (condition Has Authority) If True > Go straight to function or set Bool/float
If False > Go through custom replicated event > Execute event > Switch Has Authority, Is Authority > Straight to function or set Bool/float.

How have you done it? I want to start venturing into the players reacting to environments through animations and we are changing the skeleton but before I reset everything up again on a new Skeleton I want to make sure i’m getting it right.

Thanks

I didn’t look at your whole setup, but this could be related to a bug I reported a while back (Client character jitter/stutter - Character & Animation - Unreal Engine Forums)

This would make me happy but sad at the same time, You must have your crouch set up the same as me? Any chance you could say whether you used any Authority nodes for your crouching? Or just simply used 2 custom replicated events (1 for start, 1 for stop)that set a crouch Bool? I mainly get it while the character is walking/sprinting in all directions…

I’m embarrassed…

Just in case anyone was wondering it was an animation problem, I was allow the character to fall into the state of sprinting without pressing the shift key. I obviously tweaked the walk speed to be higher than the state condition so they jittering movement was it entering sprint.

My replication setup is fine… I am annoyed at myself but happy at the same time. Thanks Jamendxman for posting.

If anyone can take a look at my top post and maybe help with a solution for replicating turn on the spot, i’d be grateful.