Laggy/Jittery projectile movement

Hello everyone,

I’ve had this issue for months and couldn’t find a solution on any other topic, so I have great hope about you guys !!!

As you may see on the clip, the projectile movement is very laggy and jittery. It’s not critical for gameplay, but it looks very bad.

Just to help you investigate, my current setup is :

  • Server spawns projectile
  • Projectile is replicated
  • Movement replication is deactivated
  • I set the projectile velocity independently on server AND client begin plays

That way, normally, the bug cannot come from “client side projectile is trying to match with the server projectile position” since they move independently with their own velocity.

If you need to see any portion of my code, feel free to ask !

Many thanks in advance to anyone who will try to help, and have a great day.

Little bump on that with great hope…

Apparently this is not entirely true…
If you create a projectile on the client, does everything move smoothly?

Show how you move the projectile every frame, and the replication settings of the actor and the projectile mesh (sprite?) component.

Hello Predalien, thanks for the reply !

I’ve made a clip while shooting the projectile on the owning client instead of server and the issue remains :

I move the projectile at 2 different locations in the code, but with the same method. Once at begin play server side with “set velocity in local space” :

And once at the on rep notify of the variable “projectile speed”, which serves 2 main purposes on client side : run almost like a begin play and modify the speed midway, for special projectiles which start immobile for example

Replication settings of the actor :

And settings of the mesh :

Hello everyone,

A little bump on this one, still did not find a solution to this after countless hours of searching on video tutorials and threads…

Any help would be greatly appreciated

Don’t replicate the projectile. Have each proxy fire their own.

Client uses its determined values. Server uses its own and MC’s sims to use its values.

Hello Rev0verDrive and thank you for your reply.

Someone gave an advice similar to yours and to answer them, I posted a clip (which you can see in previous messages) showing what happens if I fire the projectile client side only. Its appearance is a white ball because the actual projectile “skin” comes from server replicated variables. Even when purely local I still have the issue, so I am pretty sure this is not a replication issue !

You need to create multiple projectile classes. One for each proxy.
Server calls a multicast passing projectile spawn location and the velocity.
Run a branch and check local role == simulated proxy →

Very simple process. No replication needed. The MC RPC is enough.

I turn ON/OFF the relevancy of the projectiles based on a fog of war system (to prevent map hack cheating) so I can’t have client side projectiles completely independent from the server. Let’s say the projectile is shot in the dark and then you reveal it by walking towards it, it has to be replicated. I don’t think I can bypass that. Though I agree multicast events would work for projecitles that would never have their relevancy turned off.

However like i said previously, even when i fire a projectile client side only for testing, I still have the bug so, I kinda already tried your solution of creating several actors, one for each proxy

Then you need to modify the projectile movement class to add Network Smoothing similar to how it’s done in CMC.

I have never done that and do not know what this is, do you have a tutorial or anything to share just so I have a base to work with ?

Thank you for trying to help me, greatly appreciated