I’m trying to make a camera that will always target the “center” between 4 playes and zoom out if the distance between them increases (and zoom in when decreases).
I managed easily to get the center of those players, but I’m having a lot of problems with zoom in/out functionality expecially because I have to consider that a player me be also on a different height relative to the others.
Any help or links to tutorial is well appreciated
Edit 1
I’m asking also for a suggestion about how to calculate the center, my current idea is:
- Find the point between point1 and
point2 (let’s call it between1) - Find the point between between1 and
point3 (call it between2) - Find the point between between2 and
point4
The other idea I have is this:
- Find the point between point1 and
point2 (between1) - Find the point between point3 and
point4 (between2) - Find the point between between1 and
between2
But with this, I’m having some hard times with 3 characters :\