1
0
mirror of https://github.com/originalnicodr/CinematicUnityExplorer.git synced 2026-10-10 04:53:15 +08:00

Fixed aspect ratio breaking when hotsampling in ForcedMatrix freecam mode.
Build CinematicUnityExplorer / build_dotnet (push) Has been cancelled
Build CinematicUnityExplorer / build_connector (push) Has been cancelled

This commit is contained in:
Nicolás Uriel Navall
2025-12-04 20:55:20 -03:00
parent df5a1542ba
commit d042771896
2 changed files with 6 additions and 0 deletions
+6
View File
@@ -1236,6 +1236,7 @@ namespace UnityExplorer.UI.Panels
private Quaternion cachedRotation;
private CamPaths cachedCamPathsPanel;
private bool? hasHDRPComponent = null;
private float cachedAspectRatio = -1f;
internal void Update()
{
@@ -1283,6 +1284,11 @@ namespace UnityExplorer.UI.Panels
FreeCamPanel.connector?.ExecuteCameraCommand(FreeCamPanel.GetFreecam());
FreeCamPanel.UpdatePositionInput();
if (FreeCamPanel.cameraMatrixOverrider != null && Mathf.Abs(FreeCamPanel.ourCamera.aspect - cachedAspectRatio) > 0.001f)
{
FreeCamPanel.cameraMatrixOverrider.ResetAspect();
cachedAspectRatio = FreeCamPanel.ourCamera.aspect;
}
}
}