Jumping from one player to another with the same controller


I’m developing a 4 local players videogame.

So there are 4 players in the same PC, with only one camera ( I disabled the splitscreen option) but I only have one xbox360 gamepad controller at the moment.

So what I want to do, to test my proyect as I develop it, is to have a function that allows me to switch from one player to another.

But I don’t want to posses other pawns, what I want to do is assign the gamepad to the other player. so I make sure, when I add 4 different controllers it will work perfectly too.

Problem is I’m still getting use to the structure of unreal 4, and I could use any tips, guide or posts refering to this topic, that can help me to start working on that function.

Thanks very much

I think you have to have 1 PC per player actually you may be able to just switch PC index?

You will have one PlayerControler per connected player, the must be a LocalPlayer <-> PlayerController relationship. What you have to do is to have only a single camera for the whole game. You can achieve this by adding a Camera Actor so that you use that as the view target for all players. This approach is also valid when creating a death cam in a FPS game, you just assign the view target to be another player and you camera will follow. But for sure it will be tricky to implement.

There is a console function to do exactly this “SSSwapControllers” will cycle the controller ID between the different characters.