# [SOLVED] Center Camera to TWO players "within limits"

Hi!
I can’t understand how can i center the camera within limits on TWO players.
GD have “camera within limits on a single object”, but i have two players. So i can find the X and Y of a center point between player1 and player2, but i can’t understand how respect the limits of a scene.
Thank you!

you can set the limits manually yourself, as i did here:

I noticed that this approach is actually much faster then center camea within limits.

alternativly, you can create a camcenterobject and center the camera on that object within limits.
then you have to calculate the position of that campointobject, depending on the player positions.

@Slash you are a genius!

you can create a camcenterobject and center the camera on that object within limits.
then you have to calculate the position of that campointobject, depending on the player positions.

i try this! Thank you!

Yes, in general I recommend the “center within limits” but using a camera object.

Then you just do the math of dividing the distance between the two player objects in half to choose the position of the camera object, basically.