Listen Server Player Movement/Mesh not working properly (C++)

Hi everyone,
I just started working on Unreal to build an FPS game. So far it’s an exciting journey and there are a lot of reading and figuring out.

Currently I’m having this issue that in multiplayer the input (player controlled movement) and mesh is not working correctly on my server while client got all of those right.

Here are two screenshots. The first is client side view and the second is the server side view:

As you can see from the screenshots, the first one hides the 3rd person mesh correctly while the second one is not hiding 3rd person mesh. And also input is working in the second screenshot ( i cannot move the character around).

Now this is the code for setting up the mesh compoennts in the character’s constructor (similar to the one in ShooterGame Example).

Mesh1P = ObjectInitializer.CreateDefaultSubobject<USkeletalMeshComponent>(this, TEXT("PawnMesh1P"));
	Mesh1P->AttachParent = GetCapsuleComponent();
	Mesh1P->bOnlyOwnerSee = true;
	Mesh1P->bOwnerNoSee = false;
	Mesh1P->bCastDynamicShadow = false;
	Mesh1P->bReceivesDecals = false;
	Mesh1P->MeshComponentUpdateFlag = EMeshComponentUpdateFlag::OnlyTickPoseWhenRendered;
	Mesh1P->PrimaryComponentTick.TickGroup = TG_PrePhysics;
	Mesh1P->SetCollisionObjectType(ECC_Pawn);
	Mesh1P->SetCollisionEnabled(ECollisionEnabled::NoCollision);
	Mesh1P->SetCollisionResponseToAllChannels(ECR_Ignore);

	GetMesh()->bOnlyOwnerSee = false;
	GetMesh()->bOwnerNoSee = true;
	GetMesh()->bReceivesDecals = false;
	GetMesh()->SetCollisionObjectType(ECC_Pawn);
	GetMesh()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
	GetMesh()->SetCollisionResponseToChannel(COLLISION_WEAPON, ECR_Block);
	GetMesh()->SetCollisionResponseToChannel(COLLISION_PROJECTILE, ECR_Block);
	GetMesh()->SetCollisionResponseToChannel(ECC_Visibility, ECR_Block);

I know for sure that I’m missing some basic knowledge about Unreal, and I will be grateful if you can point that out.

Thanks!

Interesting, I only saw one player logged in the game, seems like the actor on server side is not possessed or something related.

Update: I tried to run a dedicated server and two players are logged in, but one of them is upside down and no input. weird.

Crap, turned out I set auto possess player on the PlayerCharacter blueprint, which caused the the Pawn being possessed twice. After disabled that option everything just worked as it supposed to be.