godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.15k stars 20.21k forks source link

Weird behaviour when changing the offset of scaled Control nodes #52383

Open pombomakesstuff opened 3 years ago

pombomakesstuff commented 3 years ago

Godot version

3.3.stable

System information

Windows 10

Issue description

Scaled Control nodes seems to move when their offset is changed:

https://user-images.githubusercontent.com/89750373/132038373-f34325aa-904c-44d0-8da2-602404194c81.mp4

The same doesn't happen with scaled Sprite nodes:

https://user-images.githubusercontent.com/89750373/132038402-0e06ff16-ed10-4360-85fa-bfa04cf6cf8c.mp4

This behaviour apparently only happens in-editor, not in-game.

Steps to reproduce

  1. Set the scale of a Control node above or below 1:1;
  2. Change its offset property value. (it's easier to see using the toolbar pivot button)

Minimal reproduction project

No response

Calinou commented 3 years ago

Unlike Node2D, Control scaling should only be used for animation purposes at run-time. Due to the intended usage scope of Control scaling, bugs of this kind may take a while to be resolved (if ever). Use Godot's multiple resolutions support to handle different display resolutions and hiDPI monitors instead of relying on manual Control scaling, which also breaks with anchors and containers in general.