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…
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.
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.