How to let second APlayerController use second Xbox controller input?

I have two pawns in my level, and I want each to be controlled by a different xbox controller. They both share the same camera. Right now the first pawn works fine and I setup the controls like this…

    m_pCont1 = GetWorld()->GetFirstPlayerController();
    m_pCont1->Possess(m_pPawn1);
    m_pCont1->SetViewTarget(m_pCamera);

And this will eventually call into Pawn1’s SetupPlayerInputComponent() method as expected.

To set up the second pawn, I am using this code:

    m_pCont2 = GetWorld()->SpawnActor<APlayerController>();
    GetWorld()->AddController(m_pCont2);
    m_pCont2->Possess(m_pPawn2);
    m_pCont2->SetViewTarget(m_pCamera);

But Pawn2’s SetupPlayerInputComponent() method is never called. I read from other posts that a second playercontroller should automatically receive input from a second Xbox controller.

Any suggestions would help, I think I might using the wrong code to setup a new PlayerController.

Update: I changed the way I spawned the APlayerController to…

m_pCont2 = GetWorld()->GetAuthGameMode()->SpawnPlayerController(ENetRole::ROLE_None, FVector::ZeroVector, FRotator::ZeroRotator);
m_pCont2->Possess(m_pPawn2);
m_pCont2->SetViewTarget(m_pCamera);

But this still does not work :[

And I am able to possess/control the second pawn, but only the first APlayerController that I received from UWorld::GetFirstPlayerController(). And of course if I possess the second pawn, i no longer control the first pawn.

Okay, I finally got both controllers working but I used a different strategy. Instead of having the pawns already placed in the level, I placed some PlayerStarts and then in my custom GameMode, I switched the DefaultPawn member to my custom class that inherited from APawn. Then in my custom GameMode class I used the UGameplayStatics::CreatePlayer() function to spawn the pawns/playercontrollers. And this time, the input bindings were set up properly for each pawn.