Spawn Projectile Client Side

Dead horse here…

Anyway, Client can spawn a local projectile, then RPC the server to spawn a server only projectile (no replication). Then multicast the servers projectile spawn velocity (or speed and transform etc).

The multicast needs to run a check to only continue execution if the local role is a Sim proxy.

e.g.


This is a Client-Fakey / Server Auth model. Shooting clients can spawn local only shots for responsiveness, hit fx etc. The server spawns its own projectile for its sim to determine authoritative hits/dmg.

The multicast to sims only ensures that the shooters simulated proxy on all other clients fires a shot for their fx etc.

When the servers projectile hits it multicasts the hit location to all sims. Remember the clients projectile handles its own local fx.

This is a simplified example of course. Point being we are only replicating small bits of data, thus making the process as bandwidth and network friendly as possible.

5 Likes