3D How to make a top down camera that tracks multiple players 1-4 with in and out zoom?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By King C rocodile

Ive made the prototype of the game itself, all im missing is a camera that tracks the players (1-4). How far apart/close they are to eachother and zoom in and out based on that.

Have been looking at multitarget cameras on youtube etc but they are mostly for 2d and im not good enough to make that in 3d.

Help is greatly appreciated!

:bust_in_silhouette: Reply From: flurick

Perhaps the cameras fov could be lerp-ed between a max and min zoom, and check on each palyers VisibilityNotifier?

well ive kinda figured out what to do, the only problem is how to do it.
i can put the players ia group and have the camera track them. Get the position by adding the players up and dividing by numbers (i think), figure out the furthest distance away from a player to the center to get the max distance for the zoom. then i have to get the offset length and multiply with some value, and also have a minimum zoom.

thanks for the suggestion you made, i have no idea how to do that though.
i guess il figure it out eventually.

King C rocodile | 2022-10-21 16:36