Camera.orthographicSize Manual     Reference     Scripting  
Scripting > Runtime Classes > Camera

var orthographicSize : float


Camera's half-size when in orthographic mode.

This is half of the vertical size of the viewing volume. Horizontal viewing size varies depending on viewport's aspect ratio. Orthographic size is ignored when camera is not orthographic (see orthographic).

// Set the camera's ortho size to 5
camera.orthographic = true;
camera.orthographicSize = 5;

// Set the main camera's ortho size to 5
Camera.main.orthographic = true;
Camera.main.orthographicSize = 5;

See Also: camera component