jerky projectile movement on client

Hey all,
So, I’ve got projectiles set up and working in multiplayer, and everything is silky smooth on the server. On the client, I’m getting jerky movement, especially after bounces, or if there are multiple projectiles active at a time.

Here’s the replication settings for the projectile…

Capture.PNG

And here’s the projectile component settings…

Any ideas?

quick bump, since i’ve googled loads, explored my blueprints and found nothing :confused:

Only thing i’ve seen suggested is to spawn “fake” projectiles client side, that just look like what the server sees but have no gameplay impact. Is this what i should be doing?

Weird … I am not experiencing this on Kaboom Arena at all. Just this past Sunday we had 4 players online to a dedicated server and we had a shed load of bombs (all projectiles) flying all over the arena … we didn’t have this issue at all.

Have you tried using the default settings for the projectile update frequency and priority?
How are you spawning your projectiles?

in my experience - jerky movement could be a conflict of mismatching collisions between client/server or client/server fighting over somethings movement.

I’m spawning the projectiles through a message to the server, which tells a child object (the gun) to spawn the projectile. The gun sends some variables to the projectile on spawn (things like damage or movement speed).

The projectile itself does a little logic, detecting how many times it should bounce, or weather it should pass through or hit certain objects. However, on removing all this logic, the issue still happens. I’ve tried resetting all the network priority stuff, and have done research and messed with various settings, with no luck at all :frowning:

The issue becomes worse the more projectiles i have active at a time, especially after bouncing, but it’s noticeable with just 2 after a couple of bounces. They don’t smoothly move between points anymore, they appear static then teleport to around where they “should be” if they were moving smoothly that frame.

Is there an upper limit to the number of projectiles that can update at a time, from server to client? Seems odd for that to be the case, since i’m testing with 2 windows on a single PC.

This almost sounds like you are having packets being dropped or some other type of network related issue. Are you testing a packaged game? Are you testing with two windows inside the editor? Have you enabled dedicated server inside the editor when running your test?

Would it be possible for you to package your game and try it over a LAN (i.e. two different machines)?

Yeah, seems like a network thing, like it’s not updating properly somehow, or maybe not interpolating the position information the client is getting from the server…?

I’m currently testing on 2 in editor windows, without dedicated server. Will have a go tonight with dedicated server, then try it over the network at home, see if that helps…

It’s jerky probably because the location doesn’t replicate to the client every single tick, and while it waits for the location from the server it has nothing to do so it appears to have like “dropped frames” effect. The client should also set the location while at the same time getting the location replicated from the client this way the client fills in those blanks. This will make everything smooth for everyone. Anyway, that may or may not be the problem but if you could post a video or show us the blueprint that would help more.

Thank you TheFoyer! Seems like that was the problem!

My fix looked like this:

c0181f1a44e57f9c1d96f76866a20ed36617789d.jpeg

Is it worth informing the lovely dev guys at unreal about this bug? I don’t want anyone else struggling with this aswell :slight_smile:

Anything is worthwhile … head over to Answerhub and pop it in the Bugs section. 8-}

I don’t think it’s a bug. I think it’s just how it was designed.

Not having client-side prediction built-in with an option to disable qualifies as a bug in 2016. But OK, now I know so I’ll implement it myself.

Is this the recommended way to deal with multiplayer projectile oscillation?

This solution didn’t fix my problem but it helped after I found a fix.

I don’t think so.

I just had the same issue, and tracked it down to the Velocity member of the movement component, it does not replicate.

I’m setting that manually, so the projectile can inherit the velocity of it’s firing pawn. If you’re using default values that do get set on client, then it’s not this issue.

So Server (which spawns the projectiles) has the correct Velocity, and Clients seem to have a default (1.0f, 0.0f, 0.0f) Velocity.

So on server the component updates correctly, on client they’re almost still until the replication of the actor locations happens and it jerks forward.

After server spawns the projectile, NetMulticast the velocity to all clients.

Now projectiles are smooth throughout.

Hey RussEarwaker do you mind reposting the solution as a jpg because the one that youve posted is not loading for some reason, cant even click on it. I have been having this issue for some time now and i cannot find any solution online. Thanks mate

1 Like

can you please upload a new picture of your solution? I feel like I’ve tried everything and this is such a freakin tease not being able to see this

I figured out what was causing my jittering!

Go into your character’s components, like the movement component, static mesh, skeletal mesh, etc. and go into the details panel for each of these, make sure that the “Component Replicates” option for all of these is unchecked. Then package your server and game again and test it out. This should fix it! (unless you’ve got something else going on and in that case I pray for you)