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

Control nodes inside a subviewport do not observe anchoring behavior #75407

Open
croxis opened this issue Mar 27, 2023 · 2 comments
Open

Control nodes inside a subviewport do not observe anchoring behavior #75407

croxis opened this issue Mar 27, 2023 · 2 comments

Comments

@croxis
Copy link

croxis commented Mar 27, 2023

Godot version

4.0.1

System information

Arch linux

Issue description

Nodes created for a subviewport do not observe anchors layout mode.

Steps to reproduce

Create a control node scene. Throw in some colored rectangles with different anchor points. Create one colored rectangle with a position layout mode. Only the position layout mode will be rendered in the correct position.

image

becomes

image

Minimal reproduction project

Containertest.zip

@Calinou
Copy link
Member

Calinou commented Apr 1, 2023

The subviewport has a different size (512×512 by default). If your root viewport or default window size in the editor is different from the subviewport's size, it's expected that anchors will put UI elements in diffrent positions compared to the root Viewport.

@croxis Please upload a minimal reproduction project to make this easier to troubleshoot.

@croxis
Copy link
Author

croxis commented Apr 1, 2023

Attached

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