Delay on spawn projectiles form server to client

Hi, I got this issue:
I spawn projectiles (with high velocity) from server (replicated to clients) and then projectiles shows up on client with some delay. I think this is something common, because i tried with the MultiplayerShootout of unreal and happens the same but I post this question because maybe someone has found some workaround for this. The issue is only visual, because collisions and damages are working ok on the server.

This is what is happening: - YouTube

This looks more like you are calculating the start point and it multiplied by something (maybe the velocity?). If not, then you are spawning the projectile on the server and replicate the movement. I wouldn’t do that. Let the client spawn this and don’t replicate the movement. As long as the server calculates the correct projectile and damage, it isn’t important if one client saw something a bit different.

at least that’s my 2 cents here :smiley:

The start point is a socket (muzzle) in the weapon mesh, and I’m sure this is not the problem because this problem appears on the MultiplayerShootout too (Multiplayer Shootout | Unreal Engine Documentation)
I will try your solution, but it will only work for a few projectiles, other ones like grenades, have physics and the difference between server and client could be too much.

thx for your answer :slight_smile:

Did you ever find a solution for this problem? The Youtube video in the question shows exactly the issue I’m having with my multiplayer game atm. Yes it’s “only” a visual and not a gameplay problem since the server calculates damage. However the delay (or rather distance) at which the replicated projectiles appear on clients is far too long and really jarring for the players as the video shows.

Nope, I didn’t find any solution. For some time, I was spawning the trail on the muzzle, and then moving the trail with the projectile, but for some reason now the ribbon starts on the muzzle and “teleports” to the first location of the projectile without leaving any trail.

You should try spawning your projectile with 0 movement speed. Then after a few ms (10ms seems to work well) delay set the projectile movement speed to the speed the projectile should have. So the projectile will appear next to the muzzle for one frame.
That way our brains tend to “fill in” the gap between that position and the next position the bullet appears at with full speed. So the effect will be far less jarring for the players with that trick.

Hi Davixe, even this question is old, I want to know if you ever found an answer. I have the same question between some more complex replication scenario. Would be nice to know if you ever found out how to improve this. That projectiles are shown late on clients by spawn them only on server as replciated actors, is also one of my pin points: