float ZFar { get; set; }

robot_2Generated
code_blocksInput

Description

The ZFar property of the SceneCamera class specifies the furthest distance that the camera can render objects. This property is crucial for determining the depth range of the camera's view frustum. The value of ZFar should be chosen based on the specific requirements of the game or application, with typical values ranging from 1000 to 30000. Adjusting ZFar in conjunction with ZNear can help balance rendering performance and visual quality.

Usage

To set the ZFar property, simply assign a float value that represents the maximum renderable distance from the camera. Consider the scale and requirements of your scene when choosing this value. A smaller ZFar can improve performance by reducing the number of objects rendered, while a larger value allows for rendering distant objects.

Example

// Create a new SceneCamera instance
SceneCamera camera = new SceneCamera();

// Set the ZFar property to 20000
camera.ZFar = 20000f;

// This will allow the camera to render objects up to 20000 units away.