Quantcast
Channel: Answers for "Centering camera between 4 players"
Viewing all articles
Browse latest Browse all 4

Answer by Tasarran

$
0
0
I would start the camera at the center you found, then zoom back a certain increment (you'll have to figure out what works for you) Then check to see if the palyers are all visible, using [Renderer.isVisible()][1] [1]: http://file:///C:/Program%20Files/Unity/Editor/Data/Documentation/Documentation/ScriptReference/Renderer-isVisible.html Then, if they are not visible, move back again and re-check. You ought to be able to do this many times in a single Update, so you should only see the end result. As a matter of fact, it would work better with a while() loop... pseudocode! while ( All four players !(Renderer.isVisible)) { Zoom back; }

Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images