0 votes

Hi guys, I'm making a card game. I have now created a scene, with Control as the root node and Panel&Label as card appearence. How ever, when I tried to load the scene into my main scene, which is a Node2D scene, I failed to set its position with set_anchor or set_pos, inside _ready(). The result is a nonsence window.

But if I do not set any thing and just load and instance(), the card appears in the top-left corner.

Any idea?

Godot version v3.4.4
in Engine by (14 points)

1 Answer

0 votes

Control nodes use rect_position instead of position, so set it to the value of Node2d position.

by (7,743 points)
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.