godotengine / godot

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

Weird behaviour when setting the rect size via code and anchors #15061

Closed YeldhamDev closed 1 month ago

YeldhamDev commented 6 years ago

Godot version: master: 37aab45

Issue description: I have an anchored control set fully to Below, but I also have a signal that manually changes the rect_size.x when its parent is resized. This makes the anchor be completely ignored.

Minimal reproduction project: Example.zip

KoBeWi commented 3 years ago

@YeldhamDev Is this still valid in 3.2.4 beta2? I checked the project, but not sure what is the issue.

YeldhamDev commented 3 years ago

If I remember correctly: The problem is that if the bit of code in the script is uncommented, the y value of TextureRect stops being updated, even if it just overrides the x value.

And from testing right now, it seems that it still occurs.

YeldhamDev commented 2 years ago

Still happens in c2d55a4e1a353b75eb598277e9a6403fc6bfc4d5, the example has been updated.

EAinsley commented 3 months ago

Related to #92929.