Problem Porting a Player

Hello, i have problems to teleport a PlayerPawn to PlayerStart on RoundEnd.
This is a Multiplayer Project.



for (auto it = GetWorld()->GetPlayerControllerIterator(); it; ++it)
{
	auto playerController = Cast<ATOPlayerController>(*it);
	if (playerController)
	{
		APawn* tPawn = playerController->GetPawn();
		tPawn->SetActorLocation(tPlayerStartlocation, false, nullptr, ETeleportType::None);
	}
}


Some idea why this dont work?

Edit:



for (auto it = GetWorld()->GetPlayerControllerIterator(); it; ++it)
{
	auto playerController = Cast<ATOPlayerController>(*it);

	if (playerController)
	{
		APawn* tPawn = playerController->GetPawn();
		tPawn->TeleportTo(tPlayerStartlocation, tPawn->GetActorRotation());
	}
}


This dont work too.

Greez DarkSoe

try using ETeleportType::TeleportPhysics instead of ETeleportType::None

i’d also suggest printing out your current position before and after the set and the location of the point you’re trying to teleport to just to make sure its all correct