Fix infinitely scaled decals with zero scale and depth

This commit is contained in:
Andrew Cassidy 2020-06-19 17:03:17 -07:00
parent d9e0bbefda
commit 63b98a9a9a
No known key found for this signature in database
GPG Key ID: 963017B38FD477A1

View File

@ -425,6 +425,8 @@ namespace ConformalDecals {
} }
protected void UpdateScale() { protected void UpdateScale() {
scale = Mathf.Max(0.01f, scale);
depth = Mathf.Max(0.01f, depth);
var aspectRatio = materialProperties.AspectRatio; var aspectRatio = materialProperties.AspectRatio;
Vector2 size; Vector2 size;