Physics Replication and Remote Reception Aren't in Sync

I am trying to make a projectile system, but I’m noticing that the server and client are getting different impact locations. I’m calculating launch trajectory using the lookVector and assemblyVelocity of a cannon mounted on this client owned assembly.



First, the client simulates the projectile for visual purposes, and then the server receives a remote to simulate the cast for hit detection purposes. The problem is that when the server receives the remote, the physics data (velocity, position, and orientation) of the vehicle is not the same as when the client fired the request. From what I’m seeing, the physics replication is slightly behind the remote request, leading to a deviation in cast trajectories between the client and server.

To visualize this, I used blue spheres to represent the client hit position and red spheres to represent server hit position. Here is an image of how bad it is at times:

Any ideas on how to prevent this?

If there is no way to fix it, then I’ll just have to directly send trajectory data from the client to the server and pass it through some checks to make sure that it’s roughly valid.