This is what I have now.
void AMyCppController::SpawnMyCppCharacter()
{
AMyCppCharacter* ActualPawn = CastChecked<AMyCppCharacter>(GetPawn());
FActorSpawnParameters SpawnParameters;
SpawnParameters.Owner = this;
SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButDontSpawnIfColliding;
AMyCppCharacter* NewMyCppCharacter;
do
{
const FVector Location{FMath::RandRange(SpawnAreaMin.X, SpawnAreaMax.X), FMath::RandRange(SpawnAreaMin.Y, SpawnAreaMax.Y), GetPawn()->GetActorLocation().Z};
NewMyCppCharacter = GetWorld()->SpawnActor<AMyCppCharacter>(MyCppCharacterClass, Location, GetPawn()->GetActorRotation(), SpawnParameters);
}
while (NewMyCppCharacter == nullptr);
// constexpr float SmoothBlendTime = 1.0f;
// SetViewTargetWithBlend(NewMyCppCharacter, SmoothBlendTime);
//SetPawn(NewMyCppCharacter);
Possess(NewMyCppCharacter);
ActualPawn->GetMovementComponent()->StopMovementImmediately();
}
Writing this after Possess stopped the Characters from running.
ActualPawn->GetMovementComponent()->StopMovementImmediately();