mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2025-07-18 17:38:01 +08:00
Fixed bug when disabling orthographic property on freecam
This commit is contained in:
@ -345,13 +345,19 @@ namespace UnityExplorer.UI.Panels
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void MaybeToggleOrthographic(bool enable){
|
static void MaybeToggleOrthographic(bool enable){
|
||||||
// If we want to enable orthographic view but never disabled it don't do anything
|
if (ourCamera) {
|
||||||
if (enable && !disabledOrthographic)
|
if (enable) {
|
||||||
return;
|
// Only re-enable orthographic mode if we previously disabled it
|
||||||
|
if (disabledOrthographic) {
|
||||||
if (ourCamera){
|
ourCamera.orthographic = true;
|
||||||
ourCamera.orthographic = enable;
|
disabledOrthographic = false;
|
||||||
disabledOrthographic = !enable;
|
}
|
||||||
|
} else {
|
||||||
|
if (ourCamera.orthographic) {
|
||||||
|
disabledOrthographic = true;
|
||||||
|
ourCamera.orthographic = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user