Smooth Replication of Bouncing Sphere Projectiles

I’ve built a (fairly) basic 1 vs 1 multiplayer VR game for the Vive that uses motion controllers. One hand is used to control a ray-gun that launches spherical projectiles (bouncy balls); the other holds a shield that blocks the projectiles. Players face each other and try shooting balls in to the opposing goal. The game is a mix of playing racquetball and being a hockey goalie. The room is rectangular and the projectiles continue to bounce around the room until they either land in a goal or they timeout (10 seconds) and explode/destroy.

I’m having a difficult time smoothly syncing the projectiles. If I check the box to have my projectile “replicate movement”, the client sees jittery/jagged movement on the balls. They seem to be relatively in the correct place and projection, but graphically, very jumpy/twitchy.

If I uncheck “replicate movement” and then multicast spawn the projectile on the server and client, it’s perfectly smooth on the client, but after a bounce or two, becomes wildly out of sync to where server/client are seeing the projectile in completely different locations. I tried a few different things with this method, such as replicating the projectiles transform and velocity when the server copy bounces; the thought was if the client was slightly off, we could catch up to the server during the bounces, but this did not work: every server bounce, the client would teleport to the bounce and then to some new direction, basically teleporting all over the map.

If I uncheck “replicate movement” and then have the client update it’s position every tick based on the server’s replicated transform, the projectiles are perfectly synced in location (not jumpy/twitchy), but appears as if it’s running at 1/3 the framerate (i.e. strobey); it’s not silky smooth like on the listen server. This feels like the best option so far because the game is actually playable and the balls appear to sync position; but I’d REALLY like to get the movement closer to how smooth the server is. I’ve tried a handful of things with this method, such as LERPing the server transform to the client transform every tick, but this yielded no discernible change.

Is there some permutation of these strategies that will yield acceptable results? Should I change my approach from a “Projectile” to some other kind of actor? Is this even possible to accomplish in Blueprints?

I’ve scoured the internet for this issue. There’s a handful of discussions around replicating projectiles and I’ve implemented the various techniques, but they all seem to have some kind of undesirable side-effect as outlined above.

Thanks in advance!

There is a set of properties related to the accuracy of Replicated movement values.


Try using higher accuracy levels to see if this helps.

This is something I really would like to see explained as well. Replicated projectiles is a big problem for me currently.

Thanks for the reply! I have not used those properties before. Last night I created a new actor that is purely a visual representation of the sphere, that only the client can see, and attached it to the sphere that is spawned by the server; I set that server spawned sphere set to be hidden from the client. I set the client’s visual sphere to replicate movement and this looks essentially the same as when I was simply updating the client’s projectile every tick to match the server’s transform (strobey/missing frames). This morning I tried setting my new actor (client visual only) to replicate movement based on 2 decimal quantization as you screenshot, but unfortunately this had no discernible effect. Later today, I am going to try messing with this setting on some of my original setups and see if it has any effect.

Last night I also started down a new idea where I am not even using a projectile, but moving the sphere’s manually using line traces and wall collisions. I’m thinking that if I have exact, hard numbers on the server for where/when the projectile is going to hit by trace/speed, then I should be able to send that to the client and just move to that new position whenever it changes. It’s not sexy, and I suck at math, but it might work.