How to get the scaled rect of a Control Node the child of a Node2D is

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MaxEl777

If I have a control node and it has a Node2d parent node with a scale of 0.5 and I then call the get_global_rect method of the control node in the code. I always get the rectangle of the control node that is not scaled with 0.5.
How can I get that?

:bust_in_silhouette: Reply From: Thakee Nathees

try get_global_transform().get_scale() (this might be a bug and will be fixed in the future)

Thanks a lot, this is a workaround when used together with the grow method of the Rect2 structure. It’s probably really a bug.

MaxEl777 | 2020-04-10 19:21