So I am trying to find a clean way to spawn a networked projectile.
So I am spawning 2 projectiles 1 on the local clients system and the 2nd on the server that is being replicated to all client including the local client but is indivisible for the local client. The movement of the projectile is not replicated but tone individually.
I actually didn’t want to use an intermediate class to link the server and client version of projectiles.
Like e.g. The server version of the projectile that is being replicated to the local client need to interact with the local version of the projectile that is spawned for the client only.
The only why I can think of is in the class that is spawning the projectile, detect when the Server projectile is being replicated on the local client through an OnRep and then pass to pointer of the projectile spawned on the local client to it.
This is working fine but is there a better way to do it. Another idea is to use a projectile spawning class handling the spawning of projectiles.