Fix bug of moving value from zero.

This commit is contained in:
Chandler Cox
2023-05-31 13:01:41 -05:00
parent 75f1c8baaa
commit 70cb4d3cd9

View File

@@ -166,7 +166,7 @@ namespace FlaxEditor.CustomEditors.Editors
private float GetRatio(float value, float initialValue)
{
return Mathf.Abs(value / initialValue);
return (initialValue == 0) ? Mathf.Abs(value / 0.0001f) : Mathf.Abs(value / initialValue);
}
private float NewLinkedValue(float value, float valueRatio)