I remember doing something like that once. What I did was calculate the 3D
bounding box of all the objects you want to fit, then project that onto the
screen, then find the largest axis of that projected box and move the camera
in or out so that it perfectly fits that limit.

Sorry! no maths, just a method.

On Tue, Jun 22, 2010 at 2:45 PM, Brian <[email protected]> wrote:

> I'm pretty sure there's probably a mathy way to do this, but i don't
> know what it is.
>
> Let's say I have 5 cubes lined up along the X axis, and a camera
> pointing at them.
>
> Is there a way to calculate the position/parameters for the camera to
> fit a certain area in the frame, or give it an array of objects to
> "fit on screen", so to speak?
>
> Thanks,
> Brian
>

Reply via email to