Amateur question about using multiple Ps4 controllers in Unreal Engine 4 and making Ps4 games

I’m trying to wrap my head around how console controllers work with UE4. I got one Ps4 controller to work using Ds4, but I have no clue how to set up a game in unreal so that I can have 2 Ps4 controllers plugged in and select which controllers controls which character. It seems like there should be some way to detect controllers that are plugged in and assign them to individual player controllers. Another question I have is, is there not a more elegant way of using the Ps4 controller with UE4? It seems like there should be since UE4 can be used to develop for the Ps4. How do major studios do it? From what I’ve heard you have to purchase a dev kit from Sony to actually create games for Ps4, does that contain something that solves the problem?