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 can set it to one of the values defined in the StereoTargetEye
enumeration. This will determine how the camera's view is rendered in a stereo setup.
Example values include:
StereoTargetEye.Left
- Render the view for the left eye only.
StereoTargetEye.Right
- Render the view for the right eye only.
StereoTargetEye.Both
- Render the view for both eyes.
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