+1 vote

I am trying to set up UI for my game using control nodes, but I have run into a problem where all of my nodes have an eight-pixel margin on the left that is unchangeable. I need this to be zero pixels and line up perfectly with the parent control, but changing the number in editor causes it to revert back to eight. Any help would be appreciated.

in Engine by (21 points)

1 Answer

0 votes
Best answer

I notice this too.

In a scene structured as

> MarginContainer
>> Panel

Even with the Panel's margins set to the limits of the viewport, when you run the scene you still see the left margin:

enter image description here
enter image description here

To solve this, you seem to have to set not the child's Margins, but the MarginContainer's Custom Constants:

enter image description here

This removes the undesired margin.

by (1,602 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.