Projectile firepoint on client not synced up on host

Running two instances on the same machine. It appears to the host the projectile is instantiated out of position when moving forward. Little puzzled as why that it is when the client itself shows it firing out properly from the firepoint at correct location. Almost like there’s a lag in position.

Hi there,
In the course we separated the projectiles out into client and server projectiles. So the positions are not being synced across the network (the projectiles are not network objects). The projectile launcher handles the spawning, and ensures that the projectiles are being spawned at the same location on all clients and serves. The projectile launcher actually gets the position from the client when the firing occurs. (we use an isOwner check to ensure firing is only done my client owners.

What might be out of sync, is actually the tank position, which will have a tiny delay as it’s movement is synced across the network. As our clients are determining the position the projectile should be when fired, and our server is syncing movement position using a variety of data, the movement on the host could appear slightly behind the client.

Does this make sense?

1 Like

Yep, makes perfect sense.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms