I want to keep all players within the screen like in Enter the Gungeon but unfortunately I can’t achieve it. I use Centroid to find the center of the players and change the camera position to that point. Also I was trying to use Math.Clamp to set boundaries for players to stay inside camera view.
And now troubles start.
When one of the palyers approaches to this boundaries, it moves the camera and other players.
I have no idea what what to change to make it work.
Here’s what it should look like: Untitled - YouTube