Attaching Player's in a Networked Game Replication/Prediction Issues.

Sorry, this is a duplicate of a thread I made elsewhere, but I haven’t found an adequate solution to my problem. Not sure if it’s a bug or if I am just not understanding how to accomplish something.

Original thread here : Attaching a player to a player causes jittering in networked game. - C++ - Unreal Engine Forums

And an update from the Answerhub question:

Even being pointed in the right direction would be great.

Hi mrooney,

Is this still occurring for you or have you been able to find a solution to this question?

I have not found a good solution to this problem. I have found a solution that “works”, but it is ugly. What I ended up doing is making a function that essentially calls SetActorLocation/SetActorRotation to an owning actor’s carry joint, and then calling that function in a ton of places. I call it from the carried player’s tick, from the carrying player’s tick, and from the carrying player’s “PostNetReceiveLocationAndRotation”. Then I also set it to be at that position during some animations.

It’s not a great solution, but it’s the only solution I could get that didn’t look terrible.

Can you show me a screenshot of your blueprint setup? I might be able to see what is going on.

I do it all in Code unfortunately :confused: I don’t know that you’ll be able to access all the locations that I update things in blueprint :frowning:

Sadly I also can’t share the code as I don’t have any seniority at my job at all. I wish I could be more help :frowning:

I can try to give you a better summary than the previous one though.

So my carrying player has a joint/socket in his skeleton. I just have the name of that joint accessible through a constant in my code. In my overridden versions of the functions I mentioned before.

The function I made to move the actor to that joint essentially does this.

  1. Get the offset from the root bone of the carried actor, which is essentially -1.0f * GetMesh()->GetRelativeTransform().GetLocation();
  2. Get the rotation of the target transform of the carrying bone.
  3. Rotate the offset value from #1.
  4. Apply the offset to the target rotation.
  5. Move the actor to the target position and target rotation.