Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anchored controls don't resize properly when rotated #99703

Open
bmorledge-hampton19 opened this issue Nov 26, 2024 · 0 comments
Open

Anchored controls don't resize properly when rotated #99703

bmorledge-hampton19 opened this issue Nov 26, 2024 · 0 comments

Comments

@bmorledge-hampton19
Copy link

Tested versions

-Reproducible in v4.3.stable.mono.official [77dcf97]

System information

Godot v4.3.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Laptop GPU (NVIDIA; 31.0.15.4630) - 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 Threads)

Issue description

Anchors do not work properly if the node they are set on is rotated. The node's transform is updated as if the anchors were present on a node with no rotation, leading to the following (undesirable) behavior:

Screen.Recording.2024-11-25.210612.mp4

The expected behavior is for each of the objects to maintain their anchored positions as the parent is resized. For example, in the video above, the "bottom" node should remain anchored to the bottom edge of its parent, taking up ~10% of its height even as it is resized. The expected behavior is exhibited by the "top" node, which is not rotated.

Steps to reproduce

Rotate a control node 90 degrees and set its anchors so that it will have to be dynamically resized on one edge of the parent. Resize the parent node. (See above video).

Minimal reproduction project (MRP)

MRP:
rotated_control_anchors_mrp.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants