- Home /
Orthographic camera size question
I'm a bit confused on ortho camera size. The manual says it's half the size of my scene vertically. I have a plane that is 1 unit wide and .75 units tall. I want that to just fit the height of my screen. Manually found ortho size of 3.8 works for that. Implying my scene is 7.6 meters tall. Not .75 meters tall. ????
Answer by doug__ · Dec 04, 2012 at 01:23 AM
The vertical half size defines the distance from the center of the field of view to the top in world units.
If you've got a half-size of 3.8, then it should be 3.8 units from the center of the screen to the top.
If you've got a plane that's 0.75 units tall, it shouldn't take up the whole space; make sure you haven't got any scaling on it I guess, and make sure (this is a no brainer, but I guess it's worth saying) you've actually set both:
cam.orthographicSize = (float) height;
cam.orthographic = true;
Or modified the settings in the editor.
...but it sounds like you've got a scale factor of 10 on the plane. shrug
I have all that set, the scale is 1, but it's on a Unity plane which I now realize is 10 units on edge at scale of 1. So my ortho size of 3.75 now makes sense. Thanks