-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
2D label ignores rotation at runtime #37577
Comments
You are not supposed to set transforms like the rotation of children of Containers. The containers themselves do set it. You get a warning telling that too. |
I try different ways and nothing is working. I attach my example project maybe this will better show the problem |
It is not working because all Containers control rotations, as @Anutrix told you. |
Can you provide me an working example please? |
Children of containers have their position and rotation exclusively determined by their parent. The minimal reproduction project you posted doesn't actually show the bug because this isn't an issue of things being different on runtime, this is about things being invalid - if you restart Godot, you will see that everything moves to be the way it's supposed to be. This is well documented and Godot already has a big yellow warning and also prevents you from visually editing children of containers to prevent you from getting into this invalid state. Currently Godot doesn't prevent you from editing the values in the inspector, but this part is already being tracked by #28718 which will be fixed by #30623 in 4.0. |
So if rotation is also controller by the parent, how do you rotate something? There's no RotationContainer, right? Do you need to write a custom container for this to work? EDIT: Actually this appears to work and was simpler than I expected. Something like this should work if anyone else is having this issue, just attach this script to a container, and the children will be rotated.
|
Godot version:
3.2.1.rc2.offical
OS/device including version:
Windows 10
Issue description:
I try to create a UI with rotated labels in by using editor functionallity.
Steps to reproduce:
The editor shows the correct rotation, but is reseted on runtime
Minimal reproduction project:
https://drive.google.com/drive/folders/118XNo2g2K6kXGNAq0xQijb9wWr-K9WJX?usp=sharing
The text was updated successfully, but these errors were encountered: