-
-
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
Scaled CanvasLayer reports wrong area to child nodes #36166
Comments
Seems like a CanvasLayers' area should be what is visible. In other words, it seems like the CanvasLayer should report it's area as |
A quick fix is to make a root control node inside the CanvasLayer and whenever the CanvasLayer scale is set, anchor the right and bottom of the root control to the inverse of the scale. Something like:
|
A control calls the method |
I figured out a minimal fix.
Not sure if there's a better way. |
Seems like the canvas layer transforms are left out all over the place. When opening a popup, the popup is clamped to a non-translated rect. There's also my other submitted bug: #35965 |
Godot version:
3.2
OS/device including version:
Windows 10
Issue description:
When a
CanvasLayer
is scaled, it's children get the viewport size when requesting their parent's area size. This means that a scaledCanvasLayer
's children will anchor wrong.Steps to reproduce:
2DNode
sceneCanvasLayer
withscale
set to(2,2)
Control
as a child of theCanvasLayer
and set it's Layout toFull Rect
Note that the control is now twice the size of the actual viewport.
Minimal reproduction project:
https://github.com/cgbeutler/godot_bugs_CanvasLayerScaleAnchorsBug
The text was updated successfully, but these errors were encountered: