aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTwistedTwigleg2017-07-03 13:28:26 -0400
committerRémi Verschelde2017-07-14 21:58:54 +0200
commit1fa70cf9b6e28aa2d5df3d5fbd6766e47fa0475a (patch)
tree9ea14e386be7d6d884586009d690e7c747096041
parent3d95424147c7e91322af136e5e9051cd4f9f4d4f (diff)
downloadgodot-1fa70cf9b6e28aa2d5df3d5fbd6766e47fa0475a.tar.gz
godot-1fa70cf9b6e28aa2d5df3d5fbd6766e47fa0475a.tar.zst
godot-1fa70cf9b6e28aa2d5df3d5fbd6766e47fa0475a.zip
-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 1f5950be1..44fa1b023 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);
}