Merge pull request #9486 from TwistedTwigleg/Node2D_set_global_scale_fix
Fixed set_global_scale in Node2D.
This commit is contained in:
commit
686e81fcd8
|
@ -319,7 +319,7 @@ void Node2D::set_global_scale(const Size2 &p_scale) {
|
||||||
CanvasItem *pi = get_parent_item();
|
CanvasItem *pi = get_parent_item();
|
||||||
if (pi) {
|
if (pi) {
|
||||||
const Size2 parent_global_scale = pi->get_global_transform().get_scale();
|
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 {
|
} else {
|
||||||
set_scale(p_scale);
|
set_scale(p_scale);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue