0 votes

I have a Node2D with a Sprite. If I zoom with the camera the sprite gets smaller and bigger. Very normal. Now I give the Node2D e.g. a popup as a child node. If I zoom now, the popup will get accordingly smaller and larger. What do I have to do, so that the Popup doesn't get smaller and bigger when I zoom.

in Engine by (41 points)

1 Answer

+1 vote
Best answer

Make your Popup-node the child of a CanvasLayer-node.

by (10,221 points)
selected by

Thanks a lot the size does not change anymore, but the position is not correct at all. When I move the camera the popup does not stay on the Node2D.

Yeah, it's on a separate Layer and will not scroll with the camera. If you want that, you're probably better off by making sure your Popup's scale-property is equal to the Camera's zoom-property, that should cancel out the zoom as well.

Ah, OK. Thank you very much!

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.