File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
UnityEditorPackage/Runtime Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1236,6 +1236,7 @@ public FreeCamBehaviour(IntPtr ptr) : base(ptr) { }
12361236 private Quaternion cachedRotation ;
12371237 private CamPaths cachedCamPathsPanel ;
12381238 private bool ? hasHDRPComponent = null ;
1239+ private float cachedAspectRatio = - 1f ;
12391240
12401241 internal void Update ( )
12411242 {
@@ -1283,6 +1284,11 @@ internal void Update()
12831284 FreeCamPanel . connector ? . ExecuteCameraCommand ( FreeCamPanel . GetFreecam ( ) ) ;
12841285
12851286 FreeCamPanel . UpdatePositionInput ( ) ;
1287+ if ( FreeCamPanel . cameraMatrixOverrider != null && Mathf . Abs ( FreeCamPanel . ourCamera . aspect - cachedAspectRatio ) > 0.001f )
1288+ {
1289+ FreeCamPanel . cameraMatrixOverrider . ResetAspect ( ) ;
1290+ cachedAspectRatio = FreeCamPanel . ourCamera . aspect ;
1291+ }
12861292 }
12871293 }
12881294
You can’t perform that action at this time.
0 commit comments