StereoTargetEye TargetEye { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The TargetEye property of the CameraComponent class specifies which eye the camera is targeting in a stereo rendering setup. This property is useful when developing applications that support virtual reality (VR) or other stereo display systems, allowing you to control whether the camera renders for the left eye, right eye, or both.

Usage

To use the TargetEye property, you need to have a CameraComponent instance. You can set this property to one of the values defined in the StereoTargetEye enumeration, which typically includes options like Left, Right, or Both.

Example

// Example of setting the TargetEye property
CameraComponent camera = new CameraComponent();
camera.TargetEye = StereoTargetEye.Both; // Set the camera to render for both eyes in a stereo setup