Local Multiplayer With Multiple PS4 Controllers.

Hello,

I have recently started working on a fighting game. Currently, I am trying to figure out how versus mode will work out. The first problem I am facing is actually connecting multiple controllers, detecting it as P1 and P2 and then assigning them their player controllers, so each character gets its own unique input. Before getting into main game I am trying to make side select screen work. So when 2 or more controllers are connected player can select which side they want to play on. But currently, I am confused with the controllers part of it. If anyone can help guide me, it would be much appreciated.