summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/node_2d.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 9b2994ef84..a2bee43e58 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -162,6 +162,10 @@ void Node2D::set_scale(const Size2& p_scale) {
if (_xform_dirty)
((Node2D*)this)->_update_xform_values();
scale=p_scale;
+ if (scale.x==0)
+ scale.x=CMP_EPSILON;
+ if (scale.y==0)
+ scale.y=CMP_EPSILON;
_update_transform();
_change_notify("transform/scale");