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
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.