Hello! What is the best practice to smooth projectiles in a multiplayer game?
I thought of:
- Spawn Server Projectile without Movement Replication
- 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
- Spawn Client Projectile for immediate visibility
- 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
- Spawn Client Projectile for visuals
- Spawn Server Projectile (for everybody else)
- Disable visibility of Server Projectile for Client (how do i disable visibility for the server projectile? )
- 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!