What are the best practices for projectile replication?

One of the key aspects of my project is arrow projectiles. For the moment I’m able to instantiate arrows on server and replicate them on the client successfully. The problem is that on the server, the arrows are behaving as intended e.g. they “stick” to walls and follow the expected rotation throughout the whole trajectory. On the clients, however, the trajectory is correct, but the arrow rotation defaults to vertical after a frame, and the arrow does not stick to walls but slides down on contact. It doesn’t matter whether i shoot the projectile from the server or from the client. I have tried replicating only the fire function, the projectile component, then replicating all the functions that go from the character firing to the arrow collision with no positive effects. I would appreciate some guidelines, since none of the example projects seem to implement this kind of behavior. The Arrow has an owner, as well as the bow.

If something shows up on the server but not the client something is not being replicated to the client that should be. Check all your variables and functions that are related to “sticking to walls” and the “arrow rotation” and make sure they are being sent to the clients properly.

Maybe try logging out the variables on the client and server and see how they differ. That should get you going.

Did you disable physics on client?

Thanks. No, I didn’t. Should I?

In fact, if you are in client/server model, the good pratice, is to make run all physics by the server only, and to replicate position/rotation to all client.
With that you have one reference and only one for each actor, and all client have this information replicated

Then you get choppy movements on the client. Projectiles do not seem to be smooth

You have different parameters to replication which can help you to manage frequency of replication for example.
From my side, I have no problem, my projectile are so fast, that it doesn’t matter if they are not really smooth.