orthographic camera distortion

Hi, I’ve searched for “orthographic camera distortion” but I haven’t been able to to find a solution.

I’m making a side scroller and am putting in Gizmo lines that mark the top and bottom of the camera, using the camera’s orthographic size. The lines should be straight but they are angled out.

Any idea what’s going on here? It seems like a field of view problem but I’m not sure how to change that in the inspector. I fooled around with camera.fieldofview in the Gizmos code below but nothing happened.

Thank you for the help!


Here’s my code:

void OnDrawGizmos() {
    		Gizmos.color = Color.red;
    		// draw ray at top and bottom of camera
    		// bottom bound
				new Vector3 (0, -this.camera.orthographicSize), 
				new Vector3 (100, -this.camera.orthographicSize));
    		// top bound
    		Gizmos.DrawRay (
				new Vector3 (0, this.camera.orthographicSize), 
				new Vector3 (100, this.camera.orthographicSize));

Figured it out. I should be using the function Gizmos.DrawLine() instead of DrawRay(). I’m not sure why but it works!