Description
The OrthoHeight
property of the SceneCamera
class specifies the height of the orthographic projection when the Ortho
property is enabled. This property is used to define the vertical size of the orthographic view, which is crucial for rendering scenes in a 2D-like perspective where objects maintain their size regardless of their distance from the camera.
Usage
To use the OrthoHeight
property, ensure that the Ortho
property of the SceneCamera
is set to true
. Then, you can set the OrthoHeight
to the desired height value to control the vertical size of the orthographic view.
Example
// Create a new SceneCamera instance
SceneCamera camera = new SceneCamera();
// Enable orthographic projection
camera.Ortho = true;
// Set the orthographic height
camera.OrthoHeight = 10.0f;
// Now the camera will render with an orthographic height of 10 units.