Fixed set_global_scale in Node2D.

(cherry picked from commit a6feb0943a)
This commit is contained in:
TwistedTwigleg 2017-07-03 13:28:26 -04:00 committed by Rémi Verschelde
parent 3d95424147
commit 1fa70cf9b6

View File

@ -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);
}