Need a help (better still code) to help positioning my camera

Started by hytparadisee, June 11, 2007, 01:19:10 PM

Previous topic - Next topic

hytparadisee

Let's say i'm given a rectangular plane, with a known and fixed pair of width and height (e.g. 512 x 512 or 128 x 128 etc.) How could i position my camera so that it fits exactly into my screen. (exactly doesn't mean totally covered, because i know the screen won't be square! and also i do not want to change the fov or frustrum)

I know this question was asked before, but i think at that time this was not possible because the dimension of the object is unknown. Now i have the dimension of my plane defined and fixed, is it a possibility then?
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution