How to COOP 4 players cam?

I’m looking for a solution to implement 4 local coop. I need the camera to zoom in as they come closer and and zoom out when they move further apart from each others. I think I can place the camera in the middle by dividing the positions of all the players by the number of players. But how do I get the spring arm to extend based on distance. I can do it for 2 players but for 4 became too complicated math for me to solve.
Any help is much appreciated. Screen shots or links to videos is GREAT help.

Thanks in advance

Take a look at this thread:

Good luck!