Hello I have this function that increases the movement speed as the character moves up to a desired speed, basically it reaches the default speed then slowly increases. I’d like to replicate this function for the client.
Currently when the client runs this it produces a rubberbanding/laggy effect since I’m assuming it isn’t getting called as smoothly as it is when in standalone.
If it helps the function is triggered by the “inputaxis MoveForward” which I know is constantly being called but I’m not sure how frequently it is. It calls the function when the input axis is not equal to 0 (meaning the character should be moving)
This works fine in standalone or if the player is the host but for the client the movement will jitter back and forth.
What is this function? Is it input from player, is it inside begin play, tick or what?
Generaty you’ll need custom event to send it to server (if it’s not already on server) than multicast to other clients.
To do this right client in Event Graph and type custom event press enter. Name it somehow click and inside will be replication change not replicated to run on server (if this is input from client) than make next one with another name and make it multicast. Add variable to this events and this way you send it to server than to all clients.
I have it replicating already (I assume) I’ve replicated other parts of the blueprint already with the same thing you’re telling me to do it’s just this once isn’t replicating properly and I’m not sure why.
Its getting triggered from input from the player here is a picture.
It’s pretty nice even if I don’t see function SetWalk…
You’ll need to add parameter to function to get it replicated.
You should use multicast when calling it from server (authority)
You can also use custom movement (but this is more complicated). custom movement ue4 - Google Search…0…1…gws-wiz…0i19.DgeP22np4BY&ved=0ahUKEwj84ofK88_kAhXOyKQKHQ12C1gQ4dUDCAo&uact=5
The inputaxis fires every Tick, so Not a good place for replication Problem ist you are setting your movement Speed only on the Server, which is why your Client jitters (Server ist Autority, If your char has a Others Position than in the Client, IT jitters to the Server Position). Please Post the full BP or use blueprintue.com. you need use a replicated variable which is Set from the Server or/and a multicast. Maybe have a Look in rep_notify!?