private void SetPlane(Transform plane) {
float halfFOV = ( theCamera.fieldOfView * 0.5f ) * Mathf.Deg2Rad;
float aspect = theCamera.aspect;
float height = (theCamera.farClipPlane + 1) * Mathf.Tan(halfFOV);
float width = height * aspect;
plane.position = theCamera.transform.forward * ( theCamera.farClipPlane - 20);
plane.localScale = new Vector3(width * 0.1f * 2, 1, height * 0.1f * 2);
plane.rotation = theCamera.transform.rotation * Quaternion.Euler(90,180,0);
float halfFOV = ( theCamera.fieldOfView * 0.5f ) * Mathf.Deg2Rad;
float aspect = theCamera.aspect;
float height = (theCamera.farClipPlane + 1) * Mathf.Tan(halfFOV);
float width = height * aspect;
plane.position = theCamera.transform.forward * ( theCamera.farClipPlane - 20);
plane.localScale = new Vector3(width * 0.1f * 2, 1, height * 0.1f * 2);
plane.rotation = theCamera.transform.rotation * Quaternion.Euler(90,180,0);
}