float OrthographicHeight { get; set; }

robot_2Generated
code_blocksInput

Description

The OrthographicHeight property of the CameraComponent class specifies the orthographic size of the camera when the Orthographic property is set to true. This property is used to determine the height of the camera's view in world units when using an orthographic projection.

Usage

To use the OrthographicHeight property, ensure that the Orthographic property of the CameraComponent is set to true. You can then set the OrthographicHeight to define the size of the camera's view. This is particularly useful for 2D games or when a non-perspective view is required.

Example

// Example of setting the OrthographicHeight property
CameraComponent camera = new CameraComponent();
camera.Orthographic = true; // Enable orthographic projection
camera.OrthographicHeight = 10.0f; // Set the orthographic height to 10 units

// This will make the camera view cover a height of 10 units in the world space.