Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Gizmos.DrawFrustum does not match standard camera (BUG?)

$
0
0
If you attach a Gizmos.DrawFrustum to a camera it does not match the default camera. The horizontal FOV is the same but the height is not. If you set the aspect in the game view to 1:1 then they line up, but anything else and the gizmo is verticly to small.

Code (CSharp):
  1. Gizmos.DrawFrustum(new Vector3(0, 0, 0), gameObject.camera.fieldOfView, 10, gameObject.camera.nearClipPlane, gameObject.camera.pixelWidth / gameObject.camera.pixelHeight);
  2.  
  3. Gizmos.DrawFrustum(new Vector3(0, 0, 0),...
Gizmos.DrawFrustum does not match standard camera (BUG?)

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>