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!
[37658-screen+shot+2014-12-26+at+12.50.26+pm+1.png|37658]
Here’s my code:
void OnDrawGizmos() {
Gizmos.color = Color.red;
// draw ray at top and bottom of camera
// bottom bound
Gizmos.DrawRay(
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));
}