I have a C++ gamemode that overrides PostLogin and it spawns
PostLogin(APlayerController* newPlayer){
FTransform toUse;
toUse.SetLocation(FVector(0, 0, 100));
AWarfare4Unit* spawnedActor = GetWorld()->SpawnActorDeferred<AWarfare4Unit>(BPTroopClassRef, toUse, nullptr, nullptr, ESpawnActorCollisionHandlingMethod::AlwaysSpawn);
UGameplayStatics::FinishSpawningActor(spawnedActor, toUse);
if (spawnedActor) {
newPlayer->Possess(spawnedActor);
if (GEngine) {
GEngine->AddOnScreenDebugMessage(-1, 2.0f, FColor::Cyan, TEXT("Possessed"));
}
}
The character spawns, and OnPossessed gets called as well, but the thing is that I cannot control the possessed pawn, the camera seems to be at 0,0,0 and I can even see the pawn that I have spawned