UE4 LaunchCharacter in multiplayer is not working well (maybe predication)

I heard character movement is automatically replicated and predicated.
But when it comes to launch character, it seems it doesn’t work well.

I’m running a dedicated server and two clients.
And I wanna launch my character during some periods by tick function.

there are some cases

  1. Launch Character on server
    There’s stuttering on my launched character. But it looks well in the other client.

  2. Launch Character on client only
    Different with other character movement like jump, Launch Character on Client is effecting client only. The other client player can’t see it.

  3. Launch Character Multicast on server
    Both client players can see the launched character, but there still a little stuttering on my launched character.

What is the best way to use launch character in multiplayer??
Thanks.

Generally the replication flow of these things is always kinda the same :

  1. Listen for input (only on the controlling client machine, obviously)

  2. Simulate movement (and FX) on controlling client machine

  3. Send RPC (remote procedure call = replicated function) to server so the server can apply movement as well

  4. Replicate info to other clients so they can apply movement (and FX) on your character as well

Each desired application does come with its own little twist though. For example in your case, you don’t need to replicate the Launch to other clients, because the builtin movement replication will handle it smoothly. If however you want to play some effects (sound,particles) along with that launch, then you will indeed have to multicast.

2 Likes

Hello. At first, Thank you so much!
But It works well when I set client number “1”, but when I increased the client user number “2”, the launched character start stuttering. actually, it seems stucked by invisible wall in his head.
What’s the problem?

Invisible wall generally means movement is not performed on server side. Client tries to move, server sends corrections, and client corrects itself back to whatever the server says.

I don’t experience any issue on my end with multiple clients and 200 simulated ping.

Maybe you have something set up wrong? You could share what you did.

1 Like

Thank you for answer!!

Maybe my problem is calling launch character(replicated on client) on the server side

After making all the function call in the client side, it works well.

Though sometimes character still jittering… specially when I try to launch character the opposite direction.