mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-10 13:03:15 +08:00
Use the gameplay far clip plane value if the default value is still being used. Also changed the default near clip plane to be bigger, since it seems that having a super small near clip value affects how far the far clip value actually affects the gameworld.
This commit is contained in:
@@ -127,6 +127,15 @@ namespace UnityExplorer.UI.Panels
|
||||
usingGameCamera = true;
|
||||
ourCamera = lastMainCamera;
|
||||
MaybeToggleCinemachine(false);
|
||||
|
||||
// If the farClipPlaneValue is the default one try to use the one from the gameplay camera
|
||||
if (farClipPlaneValue == 2000){
|
||||
farClipPlaneValue = ourCamera.farClipPlane;
|
||||
farClipPlaneInput.Text = farClipPlaneValue.ToString();
|
||||
// Let the default farClipPlane value exceed the slider max value
|
||||
if (farClipPlaneValue <= farClipPlaneSlider.maxValue)
|
||||
farClipPlaneSlider.value = farClipPlaneValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,11 +325,11 @@ namespace UnityExplorer.UI.Panels
|
||||
UpdateClippingPlanes();
|
||||
});
|
||||
// Default value
|
||||
nearClipPlaneValue = 0.001f;
|
||||
nearClipPlaneValue = 0.1f;
|
||||
nearClipPlaneSlider.m_FillImage.color = Color.clear;
|
||||
nearClipPlaneSlider.minValue = 0.001f;
|
||||
nearClipPlaneSlider.maxValue = 100;
|
||||
nearClipPlaneSlider.value = nearClipPlaneValue;
|
||||
nearClipPlaneSlider.value = 0.1f; // doesn't take nearClipPlaneValue for some reason??
|
||||
|
||||
AddSpacer(5);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user