diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-13 13:38:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 13:38:08 +0100 |
commit | c72b5dc0bcad7adfbdb95cc3e8ef56d53ab58677 (patch) | |
tree | 5a66c6fc63d53191c28d410efaaca6cf5d1d7475 /scene/2d/node_2d.cpp | |
parent | e32d2320532c6585e339051ed85dda211311ed87 (diff) | |
parent | 100f50b7df7312f8fc56df7fd3e18427678bd957 (diff) |
Merge pull request #35073 from akien-mga/zero-scale-shall-not-pass
Control/Light2D: Preventing setting 0 as scale as for Node2D
Diffstat (limited to 'scene/2d/node_2d.cpp')
-rw-r--r-- | scene/2d/node_2d.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 7bbc7577ed..7deebe9b27 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -173,6 +173,7 @@ void Node2D::set_scale(const Size2 &p_scale) { if (_xform_dirty) ((Node2D *)this)->_update_xform_values(); _scale = p_scale; + // Avoid having 0 scale values, can lead to errors in physics and rendering. if (_scale.x == 0) _scale.x = CMP_EPSILON; if (_scale.y == 0) |