Download

Possessing in multiplier

Hey I am trying to possess another player that I have spawned in mulitplayer. When I possess there is no movement from the character just the camera has changed. I new to possession so am I doing it right or wrong or what.
Thanks.



void AZacsGameGameMode::SpawnAndPossessPlayer_Implementation(AZacsGameCharacter* actor, TSubclassOf<class AZacsGameCharacter> myClass)
{
	FActorSpawnParameters SpawnParams;
	AZacsGameCharacter* player = GetWorld()->SpawnActor<AZacsGameCharacter>(myClass, FVector(0, 0, 200), FRotator(0, 0, 0), SpawnParams);

	AController* actorCon = actor->Controller;

	actorCon->Possess(player);
	player->EnableInput(Cast<APlayerController>(actorCon));
}