summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-03 22:11:40 +0200
committerGitHub <noreply@github.com>2017-07-03 22:11:40 +0200
commit686e81fcd8c3d9fd4a173c644147c49b6c7a57a4 (patch)
treeb7325c489b6f561b29abee00d68d71d66fa897ae
parente63c64e256bc77618e4ea5ab13ecba6306ced0e6 (diff)
parenta6feb0943ab5ba98daccb2079b6bb9942f365b6c (diff)
Merge pull request #9486 from TwistedTwigleg/Node2D_set_global_scale_fix
Fixed set_global_scale in Node2D.
-rw-r--r--scene/2d/node_2d.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp
index 6fe1dd73fe..bd6ab99801 100644
--- a/scene/2d/node_2d.cpp
+++ b/scene/2d/node_2d.cpp
@@ -319,7 +319,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);
}