Hey there, i'm trying to make a dynamic zooming camera for a 4 player game. (it's an arena/stadium type game)
The idea is that the camera is always framing the 4 players with an acceptable margin. So if the players are near each other the layer zooms in, if the players are far apart, they layer zooms out.
If we could do this without the camera going outside the layout it would be great.
I've been trying to do this for a while now, but I haven't been able to produce any proper results yet. My best effort so far was to "pick the distance from the player who was farthest from the camera coordinates", and use that to manually set the zoom values on a cosp formula using lower and higher zoom values, but it's crap and doesn't work like it should, though sometimes it looks like it's going to Dx
i searched around the forums, and saw a couple post where they where using the distances of the players, compared to the window's size, but i wasn't able to make that work either. I'm assuming i'm really not good at scaling the damn layers (i need to scale only a couple of layers, and not all of them in the layout)...
anyway, any help would be really appreciated T_T