Attach to component not welding on other clients

I have written a server event that takes in a character, animal, and player controller which executes from the player controller. I have a problem where when I run this event, it takes in the right character and animal and attaches it to the component on the animal, but the server only replicates this to the player that called the function. The other clients move the character to the spot but don’t weld the character to the animal so they get thrown off and then move around the map oddly.

Meanwhile the character that called the function is mounted perfectly fine. Is this a bug? If a server event was executed properly wouldn’t that mean it would be replicated to all clients in exactly the same manner?

The picture shows the character mounted properly on the top client, but on the second client, being thrown off after trying to attach (bottom picture).

Did you ever find a solution to this? I’m having the same issue.

too …

Has anyone found a work around for this ? I find any AttachToComponent call does not work correctly on clients but the server renders it correctly.

What is also strange is I am using AttachToComponent on my player weapon and those attach correctly.

The primary difference is the Weapon is a straight up AActor with either a skeletalmesh ( bow ) or a static mesh ( sword ).

The mount and the player are both ACharacter classes so I feel like there may be something there causing the strange behavior on clients. Possession works no problem though.

Ok so I think I figured out the way this needs to work based on feedback from C++ AttachToComponent() doesn't weld on simulated proxies? - World Creation - Unreal Engine Forums

  1. You first need to disable the collision on the character mounting your bear
  2. You then need to de-activate player movement as gravity will still impact your player position

Please note that my Horse Character has a collision profile of Vehicle hence the collision ignore statement

Snippet #1

if(CurrentState == EPlayerState::MOUNTED)
	// this is needed as gravity will affect the player character

	GetCapsuleComponent()->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Ignore);
	GetMesh()->SetCollisionResponseToChannel(ECC_Vehicle, ECR_Ignore);

Snippet #2

const FAttachmentTransformRules AttachmentRules(EAttachmentRule::SnapToTarget, EAttachmentRule::SnapToTarget, EAttachmentRule::KeepWorld, true);
PlayerCharacter->AttachToComponent(HorseCharacter->GetMesh(), AttachmentRules, "RiderLinkSocket");