Merge pull request #9486 from TwistedTwigleg/Node2D_set_global_scale_fix

Fixed set_global_scale in Node2D.
This commit is contained in:
Rémi Verschelde 2017-07-03 22:11:40 +02:00 committed by GitHub
commit 686e81fcd8
1 changed files with 1 additions and 1 deletions

View File

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