Multiplayer replication is jittery

Hi,

I’m using blueprints, and I’m trying to create a multiplayer game where players can pick up objects, which then attaches to their characters.

I’ve got this mostly working, but the item is either jittery on the client, or when seen through the server, depending on which replication settings I use.

I’ve tried multiple methods, and all seem to come back to this same issue.

  • The player character has a scene component for where the object should appear.
  • I create a replicated Transform variable and get it to copy the position of the scene component.
  • When a player picks up the item, their player controller uses a custom event to Run on Server, which calls another custom event to Multicast, to tell that item to change its position and rotation to the Transform variable.
  • The item is an actor with a single static mesh component. The actor is set to Replicate and Replicate Movement but the static mesh is not (I’ve tried it both ways to no avail).

I’ve narrowed the problem down to the Transform; if I use the same logic to attach the item to the character’s position + an offset, it works fine. But trying to replicate the Transform’s position is causing big issues. Currently it sets the Transform on the Server every frame, I guess it doesn’t like that?

Cheers,

Steve

Edit: Adding some images for clarity.

This is the player character where the Transform is set on the server. I’m pretty sure the problem is with this section. I don’t know why it has to run from the ‘InputAxis Lookup’ node, but if I do it from Event Tick it doesn’t get the correct camera position. Also I disabled the second custom event multicasting and made it ‘does not replicate’ so it just fires from the server, as if it multi-casts it becomes jittery even on the server.

And this is the Player Controller, on Event Tick, setting the held item’s position:

So I solved this by attaching the item to the player’s character, and replicating both the item actor and the component within it.