Possess doesn't replicate to clients?

Hi,

I am trying to make a player spectator. I have my own spectatorpawn class and I just do this in the playercontroller class :

void ATestCopyModelPlayerController::SwitchToSpectator(bool bIsSpec)
{
	if (bIsSpec)
	{
		SetSpectator(true);
		APawn* lastPawn = GetPawn();
		this->ChangeState(NAME_Spectating);
		if (lastPawn != NULL)lastPawn->K2_DestroyActor();
		this->ClientGotoState(NAME_Spectating);
		//Possess(GetSpectatorPawn());
	}
	else
	{
		/*SetSpectator(false);
		APawn* lastPawn = GetPawn();
		this->ChangeState(NAME_Playing);
		if (lastPawn != NULL)lastPawn->K2_DestroyActor();
		this->ClientGotoState(NAME_Playing);*/
		//not implemented yet
	}
}

It is started from the gamemode (the authority) and after this I wait a second and call the Possess(GetSpectatorPawn()). My authority get the pawn and everything works but the clients only change state they don’t get any pawn (getpawn() == NULL).

What could be wrong ?

rXp

wild guess: Is the pawn-to-be-possessed set to replicate?

Yes the spectator pawn is set to replicate by default and the spectator pawn is set as the default SpectatorPawn in the gamemode.
So I don’t Spawn the pawm, I only call GetSpectatorPawn() to get it and possess it.

So I have the answer to this issue : WAIT
I only needed to add a delay of one second before switching to spectator, because there can be an issue of you try to switch before having a pawn.

Now my authority has a pawn but cannot move (but the clients can), this is another problem though.