Download

How to smooth projectiles on client?

Hello! What is the best practice to smooth projectiles in a multiplayer game?

I thought of:

  1. Spawn Server Projectile without Movement Replication
  2. Tick-> Interpolate the Transform to the Client to smooth it out
    Problem: on lag the spawn of the projectile would be delayed and movement could be weird with an interpolate if the lag is too big

or:
Projectile has no replication set

  1. Spawn Client Projectile for immediate visibility
  2. Multicast Spawn Projectile, exclude Client.
    Problem: Hit detection would be separated and for some reason the trajectory is very different on Client and Server

or this one that i can’t get working:
Projectile is replicated

  1. Spawn Client Projectile for visuals
  2. Spawn Server Projectile (for everybody else)
  3. Disable visibility of Server Projectile for Client (how do i disable visibility for the server projectile? )
  4. Interp Server and Client Transform until it is almost equal, then stop ticking and let ProjectileMovementComponent do it’s trick (how to RPC down to the clients Projectile?)

Thanks for help!

Check out the ShooterGame example.
There is some grenade launcher with a vest practices implementation