Keep players within camera area

Simplest way I can think of is attaching collision boxes to the camera that block only the player, so you have invisible walls around the valid area, that automatically move with the camera.

If you want to do some more math, you can also use a single collision box (that overlaps with player) and check the OnOverlapEnd event (=> player leaves valid area). Then you would disable movement in all directions but those that would bring the player back in the valid area. So for example if the player leaves the collision box on -x side, then you disable -x movement but still allow +x and all movement on y axis. If you want your camera to support all angles you would need some math here to lock the movement axis correctly.

Hey people!
I have a quick question about a shared screen camera!
So, i have 4 players currently, all sharing the same camera.
Now my question is, how do i limit them from going any further than a spesific length based on the camera and others players?
So what i want is borders kinda, which is activated when the player moves to far away from the other players.