From 1fa70cf9b6e28aa2d5df3d5fbd6766e47fa0475a Mon Sep 17 00:00:00 2001 From: TwistedTwigleg Date: Mon, 3 Jul 2017 13:28:26 -0400 Subject: [PATCH] Fixed set_global_scale in Node2D. (cherry picked from commit a6feb0943ab5ba98daccb2079b6bb9942f365b6c) --- scene/2d/node_2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 1f5950be163..44fa1b023c1 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -316,7 +316,7 @@ void Node2D::set_global_scale(const Size2 &p_scale) { CanvasItem *pi = get_parent_item(); if (pi) { const Size2 parent_global_scale = pi->get_global_transform().get_scale(); - set_scale(p_scale - parent_global_scale); + set_scale(p_scale / parent_global_scale); } else { set_scale(p_scale); }