Keep size of popup, label, etc. the same despite zooming.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MaxEl777

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.

:bust_in_silhouette: Reply From: njamster

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

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.

MaxEl777 | 2020-04-24 16:08

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.

njamster | 2020-04-24 19:18

Ah, OK. Thank you very much!

MaxEl777 | 2020-04-24 20:56

thank you for that answer

Infinite AC3 | 2023-07-07 18:15