godot
godot copied to clipboard
Incorrect global_position of Control (Panel) node before twice input event
Godot version
4.1.stable
System information
Godot v4.1.stable - Windows 10.0.19045 - Vulkan (Mobile) - integrated AMD Radeon(TM) R3 Graphics (Advanced Micro Devices, Inc.; 27.20.20913.2000) - AMD A4-9120 RADEON R3, 4 COMPUTE CORES 2C+2G (2 Threads)
Issue description
"global_position" is calculated incorrectly for Panel2 until the moment when "enter" is pressed twice.
"global_position" of Panel2 should be correct before and after you double-click on "enter" and its parent node GridContainer appears.
Steps to reproduce
- Create a node tree like here:
- GridContainer must contain 2 columns
- Panel and Panel2 size should be 64x64
- Add script (Control.gd) to Control node
- Control.gd must contain the following code:
- After double-clicking on "enter", the debug window should look like this: