Having problems keeping players within camera view.

I’ve tried quite a few ways but I’m having difficulties with players staying within my camera view.

Currently the camera follows in the center of the players, whether it be 1 - 4.

I tried to put a bounding volume containing only edges that blocked players within the camera view and move that volume along with the camera but often players get hung up on it some how, even if trying to move away from the edge.

Another idea came to mind where I could restrict movement once players hit an overlap volume which would be dragged with the camera, and only allow movement if the player was moving closer to the center of the screen/camera. I think this would be easy to implement but I’m still trying to understand how to determine if players projected path will be closer or further from a location.