1.3.3: Getting close to 1.0 in time scale will set it to 1.0
This commit is contained in:
parent
40fa4d7151
commit
0b147a9144
2 changed files with 4 additions and 1 deletions
|
|
@ -26,6 +26,9 @@ namespace Module.NavigationTool.Editor.Toolbar
|
|||
float temp = GUI.HorizontalSlider(r1, value, ToolbarSettings.TimeScaleMinValue, ToolbarSettings.TimeScaleMaxValue);
|
||||
temp = Mathf.Clamp(temp, ToolbarSettings.TimeScaleMinValue, ToolbarSettings.TimeScaleMaxValue);
|
||||
|
||||
if (Mathf.Abs(temp - 1.0f) < 0.02f)
|
||||
temp = 1.0f;
|
||||
|
||||
if (!Mathf.Approximately(value, temp))
|
||||
Time.timeScale = temp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue