0 votes

I tried looking around and the information for this seems to be outdated and doesn't work.

The parent node is a polygon2d and I'm trying to center a label to it after being resized to fit the polygon, which i did by adjusting the margins to the respective vectors of the polygon (It works for the resizing regardless of the label's position but the label ends up way off center).

in Engine by (75 points)

Are you able to share the project? I imagine the center is not always where it looks like it is in a polygon that somehow changes so there is probably some cleaver way to calculate that if needed

Please log in or register to answer this question.

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 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 webmaster@godotengine.org with your username.